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
|
do
|
||||||
{
|
{
|
||||||
ByteString currentFileName = Platform::WinNarrow(currentFile.name);
|
ByteString currentFileName = Platform::WinNarrow(currentFile.name);
|
||||||
if (currentFileName.length()>4)
|
if (currentFileName.length() > 4)
|
||||||
directoryList.push_back(directory+currentFileName);
|
directoryList.push_back(currentFileName);
|
||||||
}
|
}
|
||||||
while (_wfindnext(findFileHandle, ¤tFile) == 0);
|
while (_wfindnext(findFileHandle, ¤tFile) == 0);
|
||||||
_findclose(findFileHandle);
|
_findclose(findFileHandle);
|
||||||
|
@ -48,6 +48,8 @@ class LoadFilesTask: public Task
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::vector<unsigned char> data = Client::Ref().ReadFile(directory + *iter);
|
std::vector<unsigned char> data = Client::Ref().ReadFile(directory + *iter);
|
||||||
|
if (data.empty())
|
||||||
|
continue;
|
||||||
GameSave * tempSave = new GameSave(data);
|
GameSave * tempSave = new GameSave(data);
|
||||||
saveFile->SetGameSave(tempSave);
|
saveFile->SetGameSave(tempSave);
|
||||||
saveFiles.push_back(saveFile);
|
saveFiles.push_back(saveFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user