|
@@ -48,6 +48,7 @@ void wtoc(char* Dest, const WCHAR* Source)
|
|
|
Dest[i] = (char)Source[i];
|
|
Dest[i] = (char)Source[i];
|
|
|
++i;
|
|
++i;
|
|
|
}
|
|
}
|
|
|
|
|
+ Dest[i] = 0;
|
|
|
}
|
|
}
|
|
|
void ctow(WCHAR* Dest, const char* Source)
|
|
void ctow(WCHAR* Dest, const char* Source)
|
|
|
{
|
|
{
|
|
@@ -56,6 +57,7 @@ void ctow(WCHAR* Dest, const char* Source)
|
|
|
Dest[i] = (WCHAR)Source[i];
|
|
Dest[i] = (WCHAR)Source[i];
|
|
|
++i;
|
|
++i;
|
|
|
}
|
|
}
|
|
|
|
|
+ Dest[i] = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
#endif
|
|
@@ -313,17 +315,14 @@ vector<OSFileEntry> OSBasics::parseFolder(const String& pathString, bool showHid
|
|
|
SetCurrentDirectory(tmp);
|
|
SetCurrentDirectory(tmp);
|
|
|
|
|
|
|
|
|
|
|
|
|
- HANDLE hFind = FindFirstFile((LPCWSTR)"*", &findFileData);
|
|
|
|
|
|
|
+ HANDLE hFind = FindFirstFile(L"*", &findFileData);
|
|
|
if(hFind == INVALID_HANDLE_VALUE) {
|
|
if(hFind == INVALID_HANDLE_VALUE) {
|
|
|
SetCurrentDirectory(curDir);
|
|
SetCurrentDirectory(curDir);
|
|
|
return returnVector;
|
|
return returnVector;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- char fileName[260];
|
|
|
|
|
do {
|
|
do {
|
|
|
- memset(fileName, 0, 260);
|
|
|
|
|
- wtoc(fileName, findFileData.cFileName);
|
|
|
|
|
- String fname = string(fileName);
|
|
|
|
|
|
|
+ String fname(findFileData.cFileName);
|
|
|
|
|
|
|
|
if((fname.c_str()[0] != '.' || (fname.c_str()[0] == '.' && showHidden)) && fname != "..") {
|
|
if((fname.c_str()[0] != '.' || (fname.c_str()[0] == '.' && showHidden)) && fname != "..") {
|
|
|
if( findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) {
|
|
if( findFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) {
|