diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-10-13 14:35:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-13 14:35:24 +0200 |
commit | 1b656b824b12c1d70b9ad5f2d01ad63db1667a3e (patch) | |
tree | d81e3acd499719ce6dac1008a6c2797ae8edf25d /src-tauri/src/repair_and_verify/mod.rs | |
parent | fbaa5d7ad4d3674f991ae73c672190cdd6ddac01 (diff) | |
download | FlightCore-1b656b824b12c1d70b9ad5f2d01ad63db1667a3e.tar.gz FlightCore-1b656b824b12c1d70b9ad5f2d01ad63db1667a3e.zip |
refactor: Move `clean_up_download_folder_wrapper` (#628)
to `repair_and_verify` module
Diffstat (limited to 'src-tauri/src/repair_and_verify/mod.rs')
-rw-r--r-- | src-tauri/src/repair_and_verify/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs index 11dbee0e..c752a3ab 100644 --- a/src-tauri/src/repair_and_verify/mod.rs +++ b/src-tauri/src/repair_and_verify/mod.rs @@ -57,6 +57,18 @@ pub fn disable_all_but_core(game_install: GameInstall) -> Result<(), String> { Ok(()) } +/// Installs the specified mod +#[tauri::command] +pub async fn clean_up_download_folder_wrapper( + game_install: GameInstall, + force: bool, +) -> Result<(), String> { + match clean_up_download_folder(&game_install, force) { + Ok(()) => Ok(()), + Err(err) => Err(err.to_string()), + } +} + /// Deletes download folder /// If `force` is FALSE, bails on non-empty folder /// If `force` is TRUE, deletes folder even if non-empty |