unicode: use short filenames when long filename doesn't work. Temporary solution for #2100
This commit is contained in:
parent
4e121c94ab
commit
88a98a2ef0
|
@ -47,7 +47,7 @@
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
WholeProgramOptimization="false"
|
WholeProgramOptimization="false"
|
||||||
AdditionalIncludeDirectories="..\lib"
|
AdditionalIncludeDirectories="..\lib"
|
||||||
PreprocessorDefinitions="_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
TreatWChar_tAsBuiltInType="false"
|
TreatWChar_tAsBuiltInType="false"
|
||||||
|
|
|
@ -148,6 +148,12 @@ void FileListerWin32::recursiveAddFiles(std::vector<std::string> &filenames, con
|
||||||
#if defined(UNICODE)
|
#if defined(UNICODE)
|
||||||
char * ansiFfd = new char[wcslen(ffd.cFileName) + 1];
|
char * ansiFfd = new char[wcslen(ffd.cFileName) + 1];
|
||||||
TransformUcs2ToAnsi(ffd.cFileName, ansiFfd, wcslen(ffd.cFileName) + 1);
|
TransformUcs2ToAnsi(ffd.cFileName, ansiFfd, wcslen(ffd.cFileName) + 1);
|
||||||
|
if (strchr(ansiFfd, '?'))
|
||||||
|
{
|
||||||
|
delete [] ansiFfd;
|
||||||
|
ansiFfd = new char[wcslen(ffd.cAlternateFileName) + 1];
|
||||||
|
TransformUcs2ToAnsi(ffd.cAlternateFileName, ansiFfd, wcslen(ffd.cAlternateFileName) + 1);
|
||||||
|
}
|
||||||
#else // defined(UNICODE)
|
#else // defined(UNICODE)
|
||||||
char * ansiFfd = &ffd.cFileName[0];
|
char * ansiFfd = &ffd.cFileName[0];
|
||||||
#endif // defined(UNICODE)
|
#endif // defined(UNICODE)
|
||||||
|
|
Loading…
Reference in New Issue