diff options
| -rw-r--r-- | src/w32.c | 12 |
1 files changed, 7 insertions, 5 deletions
| @@ -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 | ||