From feba4717b445aaf0bf87d68546260bf5e53c8478 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 21 Apr 2024 21:54:44 +0200 Subject: fix: Properly handle steamlocate app location tristate (#902) --- src-tauri/src/northstar/install.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/northstar/install.rs b/src-tauri/src/northstar/install.rs index 048d7596..0953fa38 100644 --- a/src-tauri/src/northstar/install.rs +++ b/src-tauri/src/northstar/install.rs @@ -311,8 +311,7 @@ pub fn find_game_install_location() -> Result { } match steamdir.find_app(thermite::TITANFALL2_STEAM_ID) { - Ok(result) => { - let (app, library) = result.unwrap(); + Ok(Some((app, library))) => { let app_path = library .path() .join("steamapps") @@ -329,7 +328,11 @@ pub fn find_game_install_location() -> Result { }; return Ok(game_install); } - Err(err) => log::info!("Couldn't locate Titanfall2 Steam install. {}", err), + Ok(None) => log::info!("Couldn't locate your Titanfall 2 Steam install."), + Err(err) => log::info!( + "Something went wrong while trying to find Titanfall 2 {}", + err + ), } } Err(err) => log::info!("Couldn't locate Steam on this computer! {}", err), -- cgit v1.2.3