Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Date: Mon, 19 Sep 2005 15:10:52 -0400 (EDT) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: Bug: Setup tool doesn't respect managed mountpoints/filesystems In-Reply-To: <432F06FB.7A5422B6@dessent.net> Message-ID: References: <0IN2009A5RCXL6 AT pmismtp01 DOT mcilink DOT com> <432F06FB DOT 7A5422B6 AT dessent DOT net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Mon, 19 Sep 2005, Brian Dessent wrote: > Igor Pechtchanski wrote: > > > OTOH, one of the changes that would be worth making in the managed mount > > code is to leave the filename alone unless there's a clash, in which case > > the clashing filename becomes encoded. > > But then any file creation/renaming operation would have to check and > see if there was a clash first. That would kill performance. It would > also create race conditions, like two processes trying to create > clashing files at the same time. Yes, there are issues to work out here, but they are not very different from, say, those arising when two programs try creating a file with the same name simultaneously... In fact, the case-insensitivity of both NTFS and VFAT plays into our hands here, as you say below: creating a new file that differs only in case will always fail, so Cygwin simply has to encode the file name if its creation failed. > > This should work since both NTFS and FAT are case-preserving > > filesystems (of course, Cygwin will have to > > Preserving, yes, but not sensitive. As far as I know it is impossible > to make (V)FAT case sensitive, so creating a new file that differs only > in case will always fail. NTFS is only case sensitive if you use the > Native API, otherwise it is not case sensitive either. I seem to > remember a paragraph on MSDN that states this. > > Even if Cygwin did use the Native API, this would only work for NT with > NTFS volumes. 9x/ME has no way to do this, so you're back to encoding > filenames anyway. How is this relevant? I didn't say we don't need to encode filenames -- I said that we only need to encode filenames *if* there is a clash (or the name is special). If there is no clash, a file like "README" should be stored as-is. The only caveat I see here is that now *accesses* to files on managed mounts would have to check for case -- i.e., the managed mount code would need to replicate some of the "check_case:strict" logic. Otherwise, creating "README" and accessing it as "readme" would work (which we don't want to happen). Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. /DA -- 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/