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

Commit

Permalink
Add Errno::EEXIST as possible exception that happens on linking
Browse files Browse the repository at this point in the history
  • Loading branch information
hron committed Jan 24, 2018
1 parent 4ebedfb commit c2c51ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/paperclip/io_adapters/abstract_adapter.rb
Expand Up @@ -61,7 +61,7 @@ def link_or_copy_file(src, dest)
FileUtils.ln(src, dest, force: true) # overwrite existing
@destination.close
@destination.open.binmode
rescue Errno::EXDEV, Errno::EPERM, Errno::ENOENT => e
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)
end
Expand Down

0 comments on commit c2c51ca

Please sign in to comment.