From 42e3be2e2d641c9aebe66ce19af2b714482f629b Mon Sep 17 00:00:00 2001 From: Leon Styhre <leon@leonstyhre.com> Date: Sat, 29 Jul 2023 23:56:44 +0200 Subject: [PATCH] Fixed an issue where directories interpreted as files entries could not be removed from custom collections --- es-app/src/CollectionSystemsManager.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 38ca91671..51c06adca 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -162,10 +162,8 @@ void CollectionSystemsManager::saveCustomCollection(SystemData* sys) for (std::string gameEntry; getline(configFileIn, gameEntry);) { std::string gamePath {Utils::String::replace(gameEntry, "%ROMPATH%", rompath)}; gamePath = Utils::String::replace(gamePath, "//", "/"); - // Only add the entry if it's not a regular file or a symlink, in other words - // only add missing files. - if (!Utils::FileSystem::isRegularFile(gamePath) && - !Utils::FileSystem::isSymlink(gamePath)) + // Only add the entry if it doesn't exist, i.e. only add missing files. + if (!Utils::FileSystem::exists(gamePath)) fileGameEntries.push_back(gameEntry); } configFileIn.close();