]> source.dussan.org Git - redmine.git/commitdiff
Merged r13107 (#16710).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 May 2014 16:39:54 +0000 (16:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 24 May 2014 16:39:54 +0000 (16:39 +0000)
git-svn-id: http://svn.redmine.org/redmine/branches/2.5-stable@13165 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/mime_type.rb

index 202c01e41df6356ac783024165a548303943ecbc..2bd396871e95f1dac222d0c0953094c64f9250d1 100644 (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]