Project

General

Profile

Actions

Bug #7707

closed

FileUtils.mv fails to move symlink between filesystems

Added by mpartel (Martin Pärtel) almost 12 years ago. Updated over 10 years ago.

Status:
Rejected
Target version:
ruby -v:
ruby 1.9.3p362 (2012-12-25 revision 38607) [x86_64-linux]
Backport:
[ruby-core:51473]

Description

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.


Files

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
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0