1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
hsbt 2019-03-11 09:52:31 +00:00
parent c2d3b8dfb4
commit 7d3d8e79fe

View file

@ -527,7 +527,8 @@ module FileUtils
end
begin
File.rename s, d
rescue Errno::EXDEV
rescue Errno::EXDEV,
Errno::EPERM # move from unencrypted to encrypted dir (ext4)
copy_entry s, d, true
if secure
remove_entry_secure s, force