From: Miles Bader Date: Tue, 2 Jul 1996 16:27:07 +0000 (+0000) Subject: (msdos_downcase_filename): X-Git-Tag: emacs-19.34~274 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b443ba9a00f0af4714c352ec2881f084c2d2fa4e;p=emacs.git (msdos_downcase_filename): Always lower-case drive letters, even on systems that preserve case in filenames. --- diff --git a/src/msdos.c b/src/msdos.c index a157e1c84bc..9577e04f569 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2305,6 +2305,17 @@ void msdos_downcase_filename (p) register unsigned char *p; { + /* Always lower-case drive letters a-z, even if the filesystem + preserves case in filenames. + This is so MSDOS filenames could be compared by string comparison + functions that are case-sensitive. Even case-preserving filesystems + do not distinguish case in drive letters. */ + if (p[1] == ':' && *p >= 'A' && *p <= 'Z') + { + *p += 'a' - 'A'; + p += 2; + } + /* Under LFN we expect to get pathnames in their true case. */ if (NILP (Fmsdos_long_file_names ())) for ( ; *p; p++)