Forum: Ruby-core [ruby-trunk - Bug #7707][Open] FileUtils.mv fails to move symlink between filesystems

Posted by "mpartel (Martin Pärtel)" <martin.partel@gmail.com (Guest)
on 2013-01-16 20:06
(Received via mailing list)
Issue #7707 has been reported by mpartel (Martin Pärtel).

----------------------------------------
Bug #7707: FileUtils.mv fails to move symlink between filesystems
https://bugs.ruby-lang.org/issues/7707

Author: mpartel (Martin Pärtel)
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]


FileUtils.mv sometimes fails with a "Errno::ENOENT: No such file or 
directory - /path/to/symlink" when attempting to move a directory 
containing a symlink between filesystems. This may be because it moves 
the destination file before the symlink and then fails to move a 
"broken" symlink. Using the shell's "mv" instead works reliably.

A small test script is attached.
Posted by ko1 (Koichi Sasada) (Guest)
on 2013-02-18 01:11
(Received via mailing list)
Issue #7707 has been updated by ko1 (Koichi Sasada).

Assignee set to nobu (Nobuyoshi Nakada)
Target version changed from 1.9.3 to next minor


----------------------------------------
Bug #7707: FileUtils.mv fails to move symlink between filesystems
https://bugs.ruby-lang.org/issues/7707#change-36461

Author: mpartel (Martin Pärtel)
Status: Open
Priority: Normal
Assignee: nobu (Nobuyoshi Nakada)
Category: lib
Target version: next minor
ruby -v: ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]


FileUtils.mv sometimes fails with a "Errno::ENOENT: No such file or 
directory - /path/to/symlink" when attempting to move a directory 
containing a symlink between filesystems. This may be because it moves 
the destination file before the symlink and then fails to move a 
"broken" symlink. Using the shell's "mv" instead works reliably.

A small test script is attached.
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.