aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/msdos.c11
1 files changed, 11 insertions, 0 deletions
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
2305msdos_downcase_filename (p) 2305msdos_downcase_filename (p)
2306 register unsigned char *p; 2306 register unsigned char *p;
2307{ 2307{
2308 /* Always lower-case drive letters a-z, even if the filesystem
2309 preserves case in filenames.
2310 This is so MSDOS filenames could be compared by string comparison
2311 functions that are case-sensitive. Even case-preserving filesystems
2312 do not distinguish case in drive letters. */
2313 if (p[1] == ':' && *p >= 'A' && *p <= 'Z')
2314 {
2315 *p += 'a' - 'A';
2316 p += 2;
2317 }
2318
2308 /* Under LFN we expect to get pathnames in their true case. */ 2319 /* Under LFN we expect to get pathnames in their true case. */
2309 if (NILP (Fmsdos_long_file_names ())) 2320 if (NILP (Fmsdos_long_file_names ()))
2310 for ( ; *p; p++) 2321 for ( ; *p; p++)