Subject: Mixed case filenames patch for ntfs
From: [email-masked]

10 Mar 1998 20:46:42 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="------------C82A0920D513B882F8151B85"
To: [email-masked]

This is a multi-part message in MIME format.
--------------C82A0920D513B882F8151B85
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

   I've been working on a way to allow mixed-case filenames.  So far,
I've come up with using FILE_FLAG_POSIX_SEMANTICS.

>From msdn under CreateFile:

"
FILE_FLAG_POSIX_SEMANTICS
             Indicates that the file is to be accessed according
             to POSIX rules. This includes allowing multiple
             files with names, differing only in case, for file
             systems that support such naming. Use care when
             using this option because files created with this
             flag may not be accessible by applications
             written for MS-DOS or Windows.
"

Ive had some sucess by adding this option to all the CreateFile calls.
Now, here is what happens under the normal b19.

"
Administrator@~/test# echo "This file is named TEST" > TEST
Administrator@~/test# echo "This file is named test" > test
Administrator@~/test# ls -l
total 1
-rw-rw-rw-   1 root     None           24 Mar  9 14:32 TEST
Administrator@~/test# cat TEST
This file is named test
Administrator@~/test#
"

Heres what happens with my patch.

"
Administrator@~/test# echo "This file is named TEST" > TEST
Administrator@~/test# echo "This file is named test" > test
Administrator@~/test# ls -l
total 2
-rw-rw-rw-   1 root     None           24 Mar  9 14:34 TEST
-rw-rw-rw-   1 root     None           24 Mar  9 14:34 test
Administrator@~/test# cat TEST
This file is named TEST
Administrator@~/test# cat test
This file is named test
Administrator@~/test#
"

As you can see, basic file access works fine.  It does not work with
directories, this is a limitation of windows as far as i can tell.
I havent realy tested everything yet.  tar files containing two files
with the same name/different case work right, now.  Under win95, or a
FAT fs in NT, the setting is ignored, so things work exactly like they
did before.  The real problem is when working with these files
under normal windows apps.  If you delete TEST in explorer, test is also
removed.  Ive added an option to the CYGWIN32 env. var. to control the
behavior, CYGWIN32=[no]mixed, and it defaults to nomixed.  Also, I 
changed the /dev/null handler to use "NUL", because "nul" doesnt work
with the posix semantics option.  If ive made any mistakes, or missed
anything, please let me know.  Included is a gzip'd diff with my
changes. 
Also, im about to u/l a compiled cygwinb19.dll to ftp.deninc.com, with
all of Sergey's patches, the console color patch, and the spawnfix
patch.

- Paul.
--------------C82A0920D513B882F8151B85
Content-Type: model/vrml; name="mixedcase.diff.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="mixedcase.diff.gz"

--------------C82A0920D513B882F8151B85--

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".