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

Add Errno::EEXIST as possible exception that happens on linking #2532

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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