[Common] Return error from ScanDirectoryTreeAndCallback for missing dir

This fixes a regression introduced in #1095 that prevented Fire Emblem:
Awakening from getting past its "Extdata needs to be recreated" screen.
However, this is very likely just a bad workaround, and other things in
the FS emulation need to be fixed for this to work as intended. (Such as
DeleteExtSaveData returning an error instead of "nothing happened" if
the data does not exist as in this case. The extdata doesn't even get
created, which is what causes this prompt to appear in the first place.)
This commit is contained in:
Yuri Kunde Schlesner 2015-11-25 22:53:23 -08:00
parent 913be80782
commit f902cbd71a

View File

@ -432,7 +432,7 @@ int ScanDirectoryTreeAndCallback(const std::string &directory, std::function<int
HANDLE handle_find = FindFirstFile(Common::UTF8ToTStr(directory + "\\*").c_str(), &ffd); HANDLE handle_find = FindFirstFile(Common::UTF8ToTStr(directory + "\\*").c_str(), &ffd);
if (handle_find == INVALID_HANDLE_VALUE) { if (handle_find == INVALID_HANDLE_VALUE) {
FindClose(handle_find); FindClose(handle_find);
return found_entries; return -2;
} }
// windows loop // windows loop
do { do {