Skip to content

Commit

Permalink
Merge pull request #2943 from evazion/fix-animated-gif
Browse files Browse the repository at this point in the history
Fix exception when autotagging animated_gifs
  • Loading branch information
r888888888 committed Mar 27, 2017
2 parents db09acf + 5f1b7f4 commit b1868aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Expand Up @@ -173,7 +173,7 @@ def is_image?
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
Expand Down

0 comments on commit b1868aa

Please sign in to comment.