From f6a2f2179275476eb82efff02373978742d816d1 Mon Sep 17 00:00:00 2001 From: Thomas Jentzsch Date: Mon, 29 Nov 2021 18:23:58 +0100 Subject: [PATCH] added removing of deleted ROMs from virtual lists --- src/gui/FavoritesManager.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/FavoritesManager.cxx b/src/gui/FavoritesManager.cxx index 2c30787f8..08ff3dad2 100644 --- a/src/gui/FavoritesManager.cxx +++ b/src/gui/FavoritesManager.cxx @@ -43,7 +43,9 @@ void FavoritesManager::load() for(const auto& u : jUser) { const string& path = u.get(); - addUser(path); + FilesystemNode node(path); + if(node.exists()) + addUser(path); } } @@ -58,7 +60,9 @@ void FavoritesManager::load() for(const auto& r : jRecent) { const string& path = r.get(); - addRecent(path); + FilesystemNode node(path); + if(node.exists()) + addRecent(path); } } } @@ -73,7 +77,9 @@ void FavoritesManager::load() { const string& path = p[0].get(); const uInt32 count = p[1].get(); - myPopularMap.emplace(path, count); + FilesystemNode node(path); + if(node.exists()) + myPopularMap.emplace(path, count); } } }