Re: Msdos name alias patch for 2.1.48

Albert D. Cahalan (acahalan@cs.uml.edu)
Fri, 8 Aug 1997 16:41:20 -0400 (EDT)


There is a solution that gets rid of all the gross hacks.
The official FAT filesystem has long case-preserving filenames.
Unix is case-sensitive. No problem! Refuse a name if another
version with different case exists. No VFS crud at all.
(old msdos should just refuse the wrong case, so mount as vfat)

With the following, everything works great:

$ touch Makefile # no problem
$ ls
Makefile
$ touch Makefile # perfect match is OK
$ touch makefile # similar filename in use
touch: makefile Invalid argument
$ rm makefile
rm: makefile: No such file or directory # only Makefile exists
$ rm Makefile
$ touch makefile # now this works
$ ls
makefile
$ touch Makefile # similar filename in use
touch: Makefile Invalid argument

Other issues:

Remember that 0xE5 is legal as a first character but gets
stored on disk as 0x05. Translation goes both ways. People
should check both Win95 versions and NT to be sure though.
Hold down Alt while typing on the number pad to create the
file name at the DOS prompt: "dir > @--sick.txt" (sorry,
can't do that right in an xterm)

While dotsOK is not important, killing it does not make this
any better or worse. We should only match on the name that
shows up in a directory listing. (dotsOK always did that)