summaryrefslogtreecommitdiff
path: root/src/w32.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-05-11 17:26:00 +0000
committerRichard M. Stallman <rms@gnu.org>1996-05-11 17:26:00 +0000
commitfc85cb2995c7ce6196464dce599ad540f7dfe413 (patch)
tree96118a2d083c760554f56abff9ac296c466fc9a5 /src/w32.c
parente38ee395e84bf519f98554da69063fb9e1327243 (diff)
downloademacs-fc85cb2995c7ce6196464dce599ad540f7dfe413.tar.gz
(map_win32_filename): If not a fat volume, cvt name to dos.
Diffstat (limited to 'src/w32.c')
-rw-r--r--src/w32.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/w32.c b/src/w32.c
index 63f843606f8..bf9f858b700 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -763,7 +763,6 @@ map_win32_filename (const char * name, const char ** pPath)
static char shortname[MAX_PATH];
char * str = shortname;
char c;
- const char * orig_name = name;
char * path;
if (is_fat_volume (name, &path)) /* truncate to 8.3 */
@@ -841,14 +840,17 @@ map_win32_filename (const char * name, const char ** pPath)
}
}
*str = '\0';
-
- name = shortname;
+ }
+ else
+ {
+ strcpy (shortname, name);
+ unixtodos_filename (shortname);
}
if (pPath)
- *pPath = name + (path - orig_name);
+ *pPath = shortname + (path - name);
- return name;
+ return shortname;
}