From dbdb841edc7d8b039f17281221990c2c689bbe19 Mon Sep 17 00:00:00 2001 From: Daniel Johnson Date: Sat, 25 May 2024 15:20:33 -0400 Subject: [PATCH] Remove the old path from the cache when moving a game, so we don't get a spurious 'missing' listing --- lutris/gui/dialogs/move_game.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lutris/gui/dialogs/move_game.py b/lutris/gui/dialogs/move_game.py index 8f5bc0ef8..73f97fe44 100644 --- a/lutris/gui/dialogs/move_game.py +++ b/lutris/gui/dialogs/move_game.py @@ -6,6 +6,7 @@ from lutris.exceptions import InvalidGameMoveError from lutris.game import GAME_UPDATED from lutris.gui.dialogs import ModelessDialog, WarningDialog, display_error from lutris.util.jobs import AsyncCall, schedule_repeating_at_idle +from lutris.util.path_cache import remove_from_path_cache from lutris.util.strings import gtk_safe @@ -45,6 +46,8 @@ class MoveDialog(ModelessDialog): return True def _move_game(self): + # remove the old path from the cache + remove_from_path_cache(self.game) # not safe fire a signal from a thread- it will surely hit GTK and may crash self.new_directory = self.game.move(self.destination, no_signal=True)