From de19327fadd457b26d9210b77496987ab3f36d21 Mon Sep 17 00:00:00 2001 From: Nate Pelzel Date: Fri, 4 Sep 2026 17:08:29 -0600 Subject: [PATCH] Cache fetched games under the key the download agent reads (#490) fetch_game_logic saves a fetched game under the key "", but the download agent (and the offline path) look it up under "game/". Only the library list writes "game/". So a game that isn't in the user's library - for example an emulator pulled in as a dependency - is never found in the cache. The download agent then falls back to the game's id for the folder name and installs it into / instead of /. --- desktop/src-tauri/src/games.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop/src-tauri/src/games.rs b/desktop/src-tauri/src/games.rs index eb074c28..f73bac89 100644 --- a/desktop/src-tauri/src/games.rs +++ b/desktop/src-tauri/src/games.rs @@ -248,7 +248,7 @@ pub async fn fetch_game_logic( let data = FetchGameStruct::new(game.clone(), status, version); - cache_object(&id, &game)?; + cache_object(&format!("game/{}", id), &game)?; Ok(data) } @@ -341,7 +341,7 @@ pub async fn fetch_game_logic_offline( }; let status = GameStatusManager::fetch_state(&id, &db_handle); - let game = get_cached_object::(&id)?; + let game = get_cached_object::(&format!("game/{}", id))?; drop(db_handle);