mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Changed GuiOrphanedDataCleanup to not purge some folder entries if hidden games are not shown
This commit is contained in:
parent
8cea8e3783
commit
15c06b0d4c
|
@ -440,6 +440,12 @@ void GuiOrphanedDataCleanup::cleanupGamelists()
|
|||
{
|
||||
LOG(LogInfo) << "GuiOrphanedDataCleanup: Starting cleanup of gamelist.xml files";
|
||||
|
||||
if (!Settings::getInstance()->getBool("ShowHiddenGames")) {
|
||||
LOG(LogWarning)
|
||||
<< "The \"Show hidden games\" setting is disabled, this may lead to some orphaned "
|
||||
"folder entries not getting purged";
|
||||
}
|
||||
|
||||
const std::time_t currentTime {
|
||||
std::chrono::system_clock::to_time_t(std::chrono::system_clock::now())};
|
||||
|
||||
|
@ -595,6 +601,10 @@ void GuiOrphanedDataCleanup::cleanupGamelists()
|
|||
++removeCount;
|
||||
}
|
||||
}
|
||||
else if (!Settings::getInstance()->getBool("ShowHiddenGames")) {
|
||||
// Don't remove entries for existing folders if not displaying hidden games.
|
||||
targetRoot.append_copy((*it));
|
||||
}
|
||||
else {
|
||||
bool folderExists {false};
|
||||
for (auto child : system->getRootFolder()->getChildrenRecursive()) {
|
||||
|
|
Loading…
Reference in a new issue