Commit 13895667 by Jon Yurek

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

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