Commit 13895667 by Jon Yurek

Don't #reprocess! if there is no file.

parent 311732b3
......@@ -159,14 +159,15 @@ module Paperclip
# again.
def reprocess!
new_original = Tempfile.new("paperclip-reprocess")
old_original = to_file(:original)
new_original.write( old_original.read )
new_original.rewind
if old_original = to_file(:original)
new_original.write( old_original.read )
new_original.rewind
@queued_for_write = { :original => new_original }
post_process
@queued_for_write = { :original => new_original }
post_process
old_original.close if old_original.respond_to?(:close)
old_original.close if old_original.respond_to?(:close)
end
end
private
......
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