diff --git a/es-app/src/guis/GuiOrphanedDataCleanup.cpp b/es-app/src/guis/GuiOrphanedDataCleanup.cpp index b39f30a08..15ff155fd 100644 --- a/es-app/src/guis/GuiOrphanedDataCleanup.cpp +++ b/es-app/src/guis/GuiOrphanedDataCleanup.cpp @@ -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()) {