This is the mail archive of the cygwin@sources.redhat.com 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]

Re: Using mixed case filenames


David Starks-Browning wrote:
> 
> On Wednesday 5 Jul 00, Charles Wilson writes:
> > The mixed option existed briefly in a custom version of cygwin1.dll.
> > Sergey Okhapkin had developed a patch for that, and his 'coolview'
> > version of the B20.1 cygwin1.dll was distributed on his web page. It was
> > not official, nor was it supported by Cygnus.
> >
> > The mixed option doesn't exist in the more recent cygwin's. If you would
> > like to 'roll your own', you could get Sergey's patch, update it to
> > apply to the 1.1.x cygwin source code, and build your own dll. However,
> > I don't think that option will be supported by the mainstream kernel,
> > since it leads to a lot of undesirable behavior on Windows.
> 
> There is already an entry in the FAQ, "Are mixed-case filenames
> possible with Cygwin?"  I'll remove the disclaimer about it not being
> updated for the current release, but it doesn't currently say anything
> about Sergey's coolview patch.  Would it be wise to explain this in
> the FAQ?

I think so -- and a little information about exactly *what* Windows
problems are cause by mixed-case filenames; otherwise we'll have a new
FAQ. :-)

As I understand it, the windows file systems (NTFS-NT4.0, NTFS-W2K, and
VFAT) are case-preserving. The windows file-access API, *as used by
windows programs such as explorer and cmd.exe/command.com* is case
insensitive. However, there is no reason one could not access the
filesystem, which is case-preserving, and implement case-*SENSITIVITY*
within a proprietary API. Such as POSIX.

Guess what! Cygwin implements POSIX which defines its own file access
API! So, the 'mixed' option made use of the case-preserving aspect of
the underlying filesystem, and added case-sensitivity when using POSIX
API calls to access it. Thus, you could, *from within cygwin programs*,
create, edit, delete, and otherwise manipulate files on the windows
filesystems, with perfect case-sensitive behavior -- just like unix.

However, these files looked a bit different when viewed from standard
Windows programs. Since explorer/MSWord/cmd.exe/whathaveyou are NOT
case-sensitive, they cannot distinguish between two otherwise
identically-named files that differ only in case. So, one file hides the
other, or the short-names get hosed or cross-linked, all kinds of crazy
things may happen. Thus, it was deemed better to abide by the
least-common-denominator of the windows/cygwin platform, and eliminate
case sensitivity from cygwin in B16. Now, Sergey Okhapkin maintained a
mixed-case patch until about B20.1, for those who wished to use it. It
has not been updated to CygwinCD(V1.0) or (netrelease)V1.1.0 or later. 

--Chuck

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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