diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-05-09 23:53:48 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2023-05-09 23:53:48 +0200 |
commit | 0eac6d298ca31fdf8e8b5c65d9c7e18b85cbcec7 (patch) | |
tree | 01a6a8f3bf11ce5ed5e04425360e09c340df9451 /src-tauri/src/main.rs | |
parent | 007e32fd632da33ea1b1442f9a55f6ad008ad177 (diff) | |
download | FlightCore-0eac6d298ca31fdf8e8b5c65d9c7e18b85cbcec7.tar.gz FlightCore-0eac6d298ca31fdf8e8b5c65d9c7e18b85cbcec7.zip |
Revert "refactor: Move `check_is_valid_game_path` to `main.rs` (#335)"
This reverts commit 1ce900ca2d5cf91ae410c2ec918e1431aa15a677.
Diffstat (limited to 'src-tauri/src/main.rs')
-rw-r--r-- | src-tauri/src/main.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 7dcb8f63..d3b58b67 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -301,19 +301,6 @@ async fn check_is_flightcore_outdated_caller() -> Result<bool, String> { check_is_flightcore_outdated().await } -/// 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<(), String> { - let path_to_titanfall2_exe = format!("{game_install_path}/Titanfall2.exe"); - let is_correct_game_path = std::path::Path::new(&path_to_titanfall2_exe).exists(); - log::info!("Titanfall2.exe exists in path? {}", is_correct_game_path); - - // Exit early if wrong game path - if !is_correct_game_path { - return Err(format!("Incorrect game path \"{game_install_path}\"")); // Return error cause wrong game path - } - Ok(()) -} - /// Checks if is valid Titanfall2 install based on certain conditions #[tauri::command] async fn verify_install_location(game_path: String) -> bool { |