Date: Fri, 12 Oct 2001 10:39:25 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Tim Van Holder Message-Id: <6137-Fri12Oct2001103925+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.9 CC: djgpp-workers AT delorie DOT com In-reply-to: <1002872267.31951.8.camel@bender.falconsoft.be> (message from Tim Van Holder on 12 Oct 2001 09:37:46 +0200) Subject: Re: W2K/XP fncase [was Re: New perl package] References: <10110120257 DOT AA19829 AT clio DOT rice DOT edu> <2561-Fri12Oct2001083139+0200-eliz AT is DOT elta DOT co DOT il> <1002872267 DOT 31951 DOT 8 DOT camel AT bender DOT falconsoft DOT be> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Tim Van Holder > Date: 12 Oct 2001 09:37:46 +0200 > > > > > > W2K: > > > short: TEST. long: test > > > short: _67C0CVS. long: _.CVS > > > Fixpath: c:/test/_.CVS > > > > Good God! > > Was this on a FAT32 or NTFS filesystem (the 'c:' suggests the latter)? > Since NTFS does not store a short name, that might make a difference. I don't think it should make any difference. Function 71A8h doesn't hit the disk, it simply runs the algorithm used by Windows to generate a short alias for a long name. That's why this function works even for non-existing files, and that's why it returns a name without a numeric tail even if numeric tails are in effect. It doesn't read the directory, it just transforms the name in memory. > Fair enough - after all, the only reason we have FNCASE at all is to > avoid seeing DOS names as all-uppercase, right? And XP users are > unlikely to have many FAT32 partitions where that problem could show up. I think your assumption is wrong: this isn't related to FAT. Try running `ls' on c:\winnt (or whatever it is called on XP) and its subdirectories, and I think you will see lots of UPPER case. In addition, many Windows systems have files copied from DOS disks which Windows in its infinite wisdom copies without downcasing the string stored in the long name part of the directory entry.