From 0c6f18ab9705be0c8ffc61e365c7214e280e6df5 Mon Sep 17 00:00:00 2001 From: bslhq Date: Tue, 27 Dec 2022 06:46:53 +0800 Subject: [PATCH] TitleMgr: Fix "c" showing up in account list for saves (#590) --- src/gui/TitleManager.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/TitleManager.cpp b/src/gui/TitleManager.cpp index 519faf2b..7cf46a42 100644 --- a/src/gui/TitleManager.cpp +++ b/src/gui/TitleManager.cpp @@ -417,10 +417,12 @@ static void PopulateSavePersistentIds(wxTitleManagerList::TitleEntry& entry) { if(!it.is_directory(ec)) continue; + if(fs::is_empty(it.path())) + continue; std::string dirName = it.path().filename().string(); - uint32 persistentId = ConvertString(dirName, 16); - if (persistentId != 0) - entry.persistent_ids.emplace_back(persistentId); + if(!std::regex_match(dirName, std::regex("[0-9a-fA-F]{8}"))) + continue; + entry.persistent_ids.emplace_back(ConvertString(dirName, 16)); } }