All removed custom collection entries are now logged by GuiOrphanedDataCleanup

This commit is contained in:
Leon Styhre 2023-07-27 15:22:15 +02:00
parent ada0fa0df4
commit 44fbfbb93b

View file

@ -383,8 +383,8 @@ void GuiOrphanedDataCleanup::cleanupMediaFiles()
}
LOG(LogInfo) << "Removed " << systemProcessedCount << " file"
<< (systemProcessedCount == 1 ? " " : "s ") << "for system \"" << currentSystem
<< "\"";
<< (systemProcessedCount == 1 ? " " : "s ") << "from system \""
<< currentSystem << "\"";
SDL_Delay(500);
}
@ -739,10 +739,13 @@ void GuiOrphanedDataCleanup::cleanupCollections()
std::string expandedKey {
Utils::String::replace(gameKey, "%ROMPATH%", FileData::getROMDirectory())};
expandedKey = Utils::String::replace(expandedKey, "//", "/");
if (Utils::FileSystem::exists(expandedKey))
if (Utils::FileSystem::exists(expandedKey)) {
validEntries.emplace_back(gameKey);
else
}
else {
LOG(LogInfo) << "Found orphaned collection entry \"" << gameKey << "\"";
++removeCount;
}
}
if (configFileSource.is_open())