Skip to content

Commit

Permalink
feat: Implement verify_install_location
Browse files Browse the repository at this point in the history
  • Loading branch information
GeckoEidechse committed Jan 2, 2025
1 parent 1181c3e commit 4e9a39b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub fn run() {
greet,
github::release_notes::check_is_flightcore_outdated,
northstar::install::find_game_install_location,
repair_and_verify::verify_install_location,
util::get_flightcore_version_number,
util::is_debug_mode,
])
Expand Down
11 changes: 11 additions & 0 deletions src-tauri/src/repair_and_verify/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

/// Checks if is valid Titanfall2 install based on certain conditions
#[tauri::command]
pub async fn verify_install_location(game_path: String) -> bool {
match check_is_valid_game_path(&game_path) {
Ok(()) => true,
Err(err) => {
log::warn!("{}", err);
false
}
}
}

/// 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> {
Expand Down

0 comments on commit 4e9a39b

Please sign in to comment.