aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)
763 static char shortname[MAX_PATH]; 763 static char shortname[MAX_PATH];
764 char * str = shortname; 764 char * str = shortname;
765 char c; 765 char c;
766 const char * orig_name = name;
767 char * path; 766 char * path;
768 767
769 if (is_fat_volume (name, &path)) /* truncate to 8.3 */ 768 if (is_fat_volume (name, &path)) /* truncate to 8.3 */
@@ -841,14 +840,17 @@ map_win32_filename (const char * name, const char ** pPath)
841 } 840 }
842 } 841 }
843 *str = '\0'; 842 *str = '\0';
844 843 }
845 name = shortname; 844 else
845 {
846 strcpy (shortname, name);
847 unixtodos_filename (shortname);
846 } 848 }
847 849
848 if (pPath) 850 if (pPath)
849 *pPath = name + (path - orig_name); 851 *pPath = shortname + (path - name);
850 852
851 return name; 853 return shortname;
852} 854}
853 855
854 856