diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 17:33:37 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 17:33:37 +0200 |
commit | 1aa1c19541f472ebf3cd2354a7969e5fb43d2305 (patch) | |
tree | f1a5a9d72344a71c514d4c409678540efda50633 /src-tauri/src | |
parent | dc44b1e245f8eac6a6ea2c46262d61de793de011 (diff) | |
download | FlightCore-1aa1c19541f472ebf3cd2354a7969e5fb43d2305.tar.gz FlightCore-1aa1c19541f472ebf3cd2354a7969e5fb43d2305.zip |
Return result error type if TF|2 install not found
Diffstat (limited to 'src-tauri/src')
-rw-r--r-- | src-tauri/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index bd1aa2d8..34caddc7 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -63,12 +63,12 @@ fn main() { #[tauri::command] /// Wrapper for `find_game_install_location` as tauri doesn't allow passing `Result<>` types to front-end -fn find_game_install_location_caller() -> String { +fn find_game_install_location_caller() -> Result<String, String> { match find_game_install_location() { - Ok((path, install_type)) => path, + Ok((path, install_type)) => Ok(path), Err(err) => { println!("{}", err); - "".to_string() + Err(err.to_string()) } } } |