aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan <sentrycraft123@gmail.com>2024-04-21 21:54:44 +0200
committerGitHub <noreply@github.com>2024-04-21 21:54:44 +0200
commitfeba4717b445aaf0bf87d68546260bf5e53c8478 (patch)
tree5a4ed099cfb02fc453210e14f6b080c0ee89fad1
parent3e8c207e60bbcd566e95804e932d2b3e3bcfc2e5 (diff)
downloadFlightCore-feba4717b445aaf0bf87d68546260bf5e53c8478.tar.gz
FlightCore-feba4717b445aaf0bf87d68546260bf5e53c8478.zip
fix: Properly handle steamlocate app location tristate (#902)
-rw-r--r--src-tauri/src/northstar/install.rs9
1 files 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<GameInstall, String> {
}
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<GameInstall, String> {
};
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),