Fix local saves and migration process on Windows
This commit is contained in:
parent
fe49e58de8
commit
fb3fcfcdb7
@ -307,8 +307,8 @@ std::vector<ByteString> DirectorySearch(ByteString directory, ByteString search,
|
||||
do
|
||||
{
|
||||
ByteString currentFileName = Platform::WinNarrow(currentFile.name);
|
||||
if (currentFileName.length()>4)
|
||||
directoryList.push_back(directory+currentFileName);
|
||||
if (currentFileName.length() > 4)
|
||||
directoryList.push_back(currentFileName);
|
||||
}
|
||||
while (_wfindnext(findFileHandle, ¤tFile) == 0);
|
||||
_findclose(findFileHandle);
|
||||
|
@ -48,6 +48,8 @@ class LoadFilesTask: public Task
|
||||
try
|
||||
{
|
||||
std::vector<unsigned char> data = Client::Ref().ReadFile(directory + *iter);
|
||||
if (data.empty())
|
||||
continue;
|
||||
GameSave * tempSave = new GameSave(data);
|
||||
saveFile->SetGameSave(tempSave);
|
||||
saveFiles.push_back(saveFile);
|
||||
|
Loading…
Reference in New Issue
Block a user