Merge pull request #2943 from evazion/fix-animated-gif

Fix exception when autotagging animated_gifs
This commit is contained in:
Albert Yi
2017-03-27 14:49:43 -07:00
committed by GitHub

View File

@@ -173,7 +173,7 @@ class Post < ActiveRecord::Base
end
def is_animated_gif?
if file_ext =~ /gif/i
if file_ext =~ /gif/i && File.exists?(file_path)
return Magick::Image.ping(file_path).length > 1
else
return false