Merged r13107 (#16710).

git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13165 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2014-05-24 16:39:54 +00:00
parent a6d62710cd
commit a532ba114e

View File

@@ -60,7 +60,7 @@ module Redmine
extension = m[2].downcase
@known_types ||= Hash.new do |h, ext|
type = EXTENSIONS[ext]
type ||= MIME::Types.find {|type| type.extensions.include?(ext)}.to_s.presence
type ||= MIME::Types.type_for(ext).first.to_s.presence
h[ext] = type
end
@known_types[extension]