(map_win32_filename): If not a fat volume, cvt name to dos.
authorRichard M. Stallman <rms@gnu.org>
Sat, 11 May 1996 17:26:00 +0000 (17:26 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 11 May 1996 17:26:00 +0000 (17:26 +0000)
src/w32.c

index 63f8436..bf9f858 100644 (file)
--- 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;
 }