Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Also open destination file in symlink failure case
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgrig authored and sidraval committed Mar 2, 2018
1 parent a99ffec commit 93acc67
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/paperclip/io_adapters/abstract_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def link_or_copy_file(src, dest)
rescue Errno::EXDEV, Errno::EPERM, Errno::ENOENT, Errno::EEXIST => e
Paperclip.log("Link failed with #{e.message}; copying link #{src} to #{dest}")
FileUtils.cp(src, dest)
@destination.open.binmode
end
end
end

0 comments on commit 93acc67

Please sign in to comment.