Mail Archives: cygwin/2006/12/08/16:02:50
$ mount -m
mount -f -u -b -o managed "C:/cygwin/home/eblake/managed" "/home/eblake/managed"
mount -f -s -b "C:/cygwin/bin" "/usr/bin"
mount -f -s -b "C:/cygwin/lib" "/usr/lib"
mount -f -s -b "C:/cygwin" "/"
mount -s -b --change-cygdrive-prefix "/cygdrive"
$ mkdir managed/dir
$ touch managed/dir/Oops
$ mv managed/dir .
$ ls dir
%4Fops
$ touch dir/oOPS
$ mv dir managed/.
$ ls -F managed/dir
ls: cannot access managed/dir/oOPS: No such file or directory
Oops oOPS
It seems to me that rename(2) should be taught that if the file being moved is
a directory, and there is a difference in managed-ness between the source and
destination, then rename(2) should fail with EXDEV, so that mv(1) will fall
back to recursive copying. That would avoid the problems shown above where
escapes escaped to normal directories, as well as problems with un-statable
files when copying from normal to managed, since filenames would be handled on
a per-file basis (possibly failing when going from managed to normal, of
course), rather than the current behavior of renaming the directory without
changing its contents.
--
Eric Blake
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -