From 1aa1c19541f472ebf3cd2354a7969e5fb43d2305 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sat, 10 Sep 2022 17:33:37 +0200 Subject: Return result error type if TF|2 install not found --- src-tauri/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src-tauri/src') 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 { 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()) } } } -- cgit v1.2.3