Bug #7707 fails to move symlink between filesystems

Added by mpartel (Martin Pärtel) almost 6 years ago. Updated over 4 years ago.

Target version:
ruby -v:
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]

Description 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.

test.rb (627 Bytes) test.rb Test script (requires bindfs and linux but easy enough to modify) mpartel (Martin Pärtel), 01/17/2013 04:05 AM


#1 [ruby-core:52407] Updated by ko1 (Koichi Sasada) almost 6 years ago

  • Assignee set to nobu (Nobuyoshi Nakada)
  • Target version changed from 1.9.3 to 2.6

#2 [ruby-core:63640] Updated by jacknagel (Jack Nagel) over 4 years ago

In Homebrew, we have code that works around this by shelling out to mv when necessary. It would be nice to have this fixed.

#3 [ruby-core:64330] Updated by hsbt (Hiroshi SHIBATA) over 4 years ago

  • Status changed from Open to Rejected

This issue is fixed by r46783.

If you still have this issue, Please reopen this.

Also available in: Atom PDF