Skip to content

Commit 70f21e8

Browse files
committed
fall back to copy + unlink on EPERM
[Feature #15415][ruby-core:90536] Co-authored-by: Eric Wong <normalperson@yhbt.net> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 12b0aa8 commit 70f21e8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/fileutils.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ def mv(src, dest, force: nil, noop: nil, verbose: nil, secure: nil)
529529
end
530530
begin
531531
File.rename s, d
532-
rescue Errno::EXDEV
532+
rescue Errno::EXDEV,
533+
Errno::EPERM # move from unencrypted to encrypted dir (ext4)
533534
copy_entry s, d, true
534535
if secure
535536
remove_entry_secure s, force

0 commit comments

Comments
 (0)