From 057f5beac6cf10a2b7d74dfe07cd074e221aed14 Mon Sep 17 00:00:00 2001 From: Megamouse Date: Sun, 11 Dec 2022 09:35:27 +0100 Subject: [PATCH] Qt: remove cache dir when deleting games --- rpcs3/rpcs3qt/game_list_frame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/rpcs3/rpcs3qt/game_list_frame.cpp b/rpcs3/rpcs3qt/game_list_frame.cpp index 7c98b394b6..16e01af592 100644 --- a/rpcs3/rpcs3qt/game_list_frame.cpp +++ b/rpcs3/rpcs3qt/game_list_frame.cpp @@ -1426,9 +1426,14 @@ void game_list_frame::ShowContextMenu(const QPoint &pos) { if (remove_caches) { - RemoveShadersCache(cache_base_dir); - RemovePPUCache(cache_base_dir); - RemoveSPUCache(cache_base_dir); + if (fs::is_dir(cache_base_dir)) + { + if (fs::remove_all(cache_base_dir)) + game_list_log.notice("Removed cache directory: '%s'", cache_base_dir); + else + game_list_log.error("Could not remove cache directory: '%s' (%s)", cache_base_dir, fs::g_tls_error); + } + RemoveCustomConfiguration(current_game.serial); RemoveCustomPadConfiguration(current_game.serial); }