Commit 47d501b0 by jyurek

Fixed deletion problem.

git-svn-id: https://svn.thoughtbot.com/plugins/paperclip/trunk@179 7bbfaf0e-4d1d-0410-9690-a8bb5f8ef2aa
parent 35819883
......@@ -276,7 +276,7 @@ module Thoughtbot #:nodoc:
(attachment[:thumbnails].keys + [:original]).each do |style|
file_path = path_for(attachment, style)
begin
FileUtils.rm(file_path)
FileUtils.rm file_path if file_path
rescue Errno::ENOENT
raise ThumbnailDeletionError if ::Thoughtbot::Paperclip.options[:whiny_deletes] || complain
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment