X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Eric Blake Subject: managed mount bug Date: Fri, 8 Dec 2006 21:02:05 +0000 (UTC) Lines: 30 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com $ 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/