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

Commit c2c51ca

Browse files
committed
Add Errno::EEXIST as possible exception that happens on linking
1 parent 4ebedfb commit c2c51ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/paperclip/io_adapters/abstract_adapter.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def link_or_copy_file(src, dest)
6161
FileUtils.ln(src, dest, force: true) # overwrite existing
6262
@destination.close
6363
@destination.open.binmode
64-
rescue Errno::EXDEV, Errno::EPERM, Errno::ENOENT => e
64+
rescue Errno::EXDEV, Errno::EPERM, Errno::ENOENT, Errno::EEXIST => e
6565
Paperclip.log("Link failed with #{e.message}; copying link #{src} to #{dest}")
6666
FileUtils.cp(src, dest)
6767
end

0 commit comments

Comments
 (0)