TitleMgr: Fix "c" showing up in account list for saves (#590)

This commit is contained in:
bslhq 2022-12-27 06:46:53 +08:00 committed by GitHub
parent 058d11b49b
commit 0c6f18ab97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -417,10 +417,12 @@ static void PopulateSavePersistentIds(wxTitleManagerList::TitleEntry& entry)
{ {
if(!it.is_directory(ec)) if(!it.is_directory(ec))
continue; continue;
if(fs::is_empty(it.path()))
continue;
std::string dirName = it.path().filename().string(); std::string dirName = it.path().filename().string();
uint32 persistentId = ConvertString<uint32>(dirName, 16); if(!std::regex_match(dirName, std::regex("[0-9a-fA-F]{8}")))
if (persistentId != 0) continue;
entry.persistent_ids.emplace_back(persistentId); entry.persistent_ids.emplace_back(ConvertString<uint32>(dirName, 16));
} }
} }