aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 11:17:26 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 11:17:26 +0200
commitf6bc90dfc7242f7652cda2edb7cad2ff335c0b7b (patch)
treee531043c5306fc8cbc04abe505656d92e1d802ed /src-tauri/src/lib.rs
parent149b0235433865d419f438025d60eb4885cf6258 (diff)
downloadFlightCore-f6bc90dfc7242f7652cda2edb7cad2ff335c0b7b.tar.gz
FlightCore-f6bc90dfc7242f7652cda2edb7cad2ff335c0b7b.zip
Store format string in variable before use
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 5eb19b5b..edf39842 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -88,8 +88,9 @@ pub fn get_northstar_version_number(game_path: String) -> Result<String, anyhow:
/// Checks whether the provided path is a valid Titanfall2 gamepath by checking against a certain set of criteria
pub fn check_is_valid_game_path(game_install_path: &str) -> Result<(), anyhow::Error> {
+ let path_to_titanfall2_exe = format!("{}/Titanfall2.exe", game_install_path);
let is_correct_game_path =
- std::path::Path::new(&format!("{}/Titanfall2.exe", game_install_path)).exists();
+ std::path::Path::new(&path_to_titanfall2_exe).exists();
println!("Titanfall2.exe exists in path? {}", is_correct_game_path);
// Exit early if wrong game path