mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
(msdos_downcase_filename):
Always lower-case drive letters, even on systems that preserve case in filenames.
This commit is contained in:
parent
837ee038c5
commit
b443ba9a00
1 changed files with 11 additions and 0 deletions
11
src/msdos.c
11
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++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue