Permalink
Browse files

Remove a file.close: users reporting problems

  • Loading branch information...
1 parent 38c51d6 commit c132f6c7f64f9394cd0ca2521da2f71d9a9d6774 @jyurek jyurek committed Jan 31, 2014
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/paperclip/attachment.rb
@@ -458,11 +458,8 @@ def post_process_styles(*style_args) #:nodoc:
def post_process_style(name, style) #:nodoc:
begin
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|
- new_file = Paperclip.processor(processor).make(file, style.processor_options, self)
- file.close unless file == original_file
- new_file
+ Paperclip.processor(processor).make(file, style.processor_options, self)
end
unadapted_file = @queued_for_write[name]
@queued_for_write[name] = Paperclip.io_adapters.for(@queued_for_write[name])

0 comments on commit c132f6c

Please sign in to comment.