Skip to content

Loading…

open uri too many open files. UriAdapter missing close statement #1022

Closed
trcarden opened this Issue · 2 comments

3 participants

@trcarden

When importing a bunch of URIs into paperclip i use the UriAdapter. It works great. However its missing a close call (see below). You need to either pass a block to uri-open. Since the code doesn't lend itself to a block just close it after the copy.

module Paperclip
  class UriAdapter < AbstractAdapter
   def initialize(target)
    @target = target
    @content = download_content
    cache_current_values
    @tempfile = copy_to_tempfile(@content)

   # Missing this:
   # @content.close

 end
@masterkain

+1 I guess

@djcp

Should be fixed here: d71cc2d

@djcp djcp closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.