This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

managed mount bug


$ 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]