From 3136d2b782f324a6c8e624f6a168d6efa0b1b870 Mon Sep 17 00:00:00 2001 From: Collecting Date: Sat, 3 Jan 2026 04:38:12 +0000 Subject: [PATCH] fix(fs): race condition in save mirroring during config changes Signed-off-by: Collecting --- src/citron/game_list.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/citron/game_list.cpp b/src/citron/game_list.cpp index a9ff04698..fc6ddccf2 100644 --- a/src/citron/game_list.cpp +++ b/src/citron/game_list.cpp @@ -954,8 +954,13 @@ void GameList::DonePopulating(const QStringList& watch_list) { } } - LOG_INFO(Frontend, "Game List populated. Triggering Mirror Sync..."); - system.GetFileSystemController().GetSaveDataFactory().PerformStartupMirrorSync(); + // Only sync if we aren't rebuilding the UI and the game isn't running. + if (main_window && !main_window->IsConfiguring() && !system.IsPoweredOn()) { + LOG_INFO(Frontend, "Game List populated. Triggering Mirror Sync..."); + system.GetFileSystemController().GetSaveDataFactory().PerformStartupMirrorSync(); + } else { + LOG_INFO(Frontend, "Mirroring: Startup sync skipped (Reason: UI Busy or Game is Emulating)."); + } emit PopulatingCompleted(); }