unicode: updates to the handling of unicode filenames. Ticket: #2100
This commit is contained in:
parent
88a98a2ef0
commit
28e40cb9b0
|
@ -47,7 +47,7 @@
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
WholeProgramOptimization="false"
|
WholeProgramOptimization="false"
|
||||||
AdditionalIncludeDirectories="..\lib"
|
AdditionalIncludeDirectories="..\lib"
|
||||||
PreprocessorDefinitions="_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS;UNICODE"
|
PreprocessorDefinitions="_DEBUG;WIN32;_CRT_SECURE_NO_WARNINGS"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
TreatWChar_tAsBuiltInType="false"
|
TreatWChar_tAsBuiltInType="false"
|
||||||
|
|
|
@ -148,14 +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);
|
||||||
|
#else // defined(UNICODE)
|
||||||
|
const char * ansiFfd = &ffd.cFileName[0];
|
||||||
if (strchr(ansiFfd,'?'))
|
if (strchr(ansiFfd,'?'))
|
||||||
{
|
{
|
||||||
delete [] ansiFfd;
|
ansiFfd = &ffd.cAlternateFileName[0];
|
||||||
ansiFfd = new char[wcslen(ffd.cAlternateFileName) + 1];
|
|
||||||
TransformUcs2ToAnsi(ffd.cAlternateFileName, ansiFfd, wcslen(ffd.cAlternateFileName) + 1);
|
|
||||||
}
|
}
|
||||||
#else // defined(UNICODE)
|
|
||||||
char * ansiFfd = &ffd.cFileName[0];
|
|
||||||
#endif // defined(UNICODE)
|
#endif // defined(UNICODE)
|
||||||
|
|
||||||
std::ostringstream fname;
|
std::ostringstream fname;
|
||||||
|
|
Loading…
Reference in New Issue