Commit c132f6c7 by Jon Yurek

Remove a file.close: users reporting problems

parent 38c51d6f
...@@ -458,11 +458,8 @@ module Paperclip ...@@ -458,11 +458,8 @@ module Paperclip
def post_process_style(name, style) #:nodoc: def post_process_style(name, style) #:nodoc:
begin begin
raise RuntimeError.new("Style #{name} has no processors defined.") if style.processors.blank? raise RuntimeError.new("Style #{name} has no processors defined.") if style.processors.blank?
original_file = @queued_for_write[:original]
@queued_for_write[name] = style.processors.inject(@queued_for_write[:original]) do |file, processor| @queued_for_write[name] = style.processors.inject(@queued_for_write[:original]) do |file, processor|
new_file = Paperclip.processor(processor).make(file, style.processor_options, self) Paperclip.processor(processor).make(file, style.processor_options, self)
file.close unless file == original_file
new_file
end end
unadapted_file = @queued_for_write[name] unadapted_file = @queued_for_write[name]
@queued_for_write[name] = Paperclip.io_adapters.for(@queued_for_write[name]) @queued_for_write[name] = Paperclip.io_adapters.for(@queued_for_write[name])
......
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