aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-08-03 19:43:17 +0200
committerGitHub <noreply@github.com>2023-08-03 19:43:17 +0200
commit37e5f80704234231cf42bceb6fbbdf3a93771a2e (patch)
treec82fe8566558649f03cc6676a09e9386a9cc651a
parente75f5f8baf5169d37962fadbac6609146900e070 (diff)
downloadFlightCore-37e5f80704234231cf42bceb6fbbdf3a93771a2e.tar.gz
FlightCore-37e5f80704234231cf42bceb6fbbdf3a93771a2e.zip
fix: Go over all folders during cleanup (#469)
* fix: Go over all folders during cleanup of early return on error * fix: Remove now unused import
-rw-r--r--src-tauri/src/repair_and_verify/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs
index 6b9d3a98..8b68ce59 100644
--- a/src-tauri/src/repair_and_verify/mod.rs
+++ b/src-tauri/src/repair_and_verify/mod.rs
@@ -1,7 +1,6 @@
use crate::mod_management::{get_enabled_mods, rebuild_enabled_mods_json, set_mod_enabled_status};
/// Contains various functions to repair common issues and verifying installation
use crate::{constants::CORE_MODS, GameInstall};
-use anyhow::anyhow;
/// Verifies Titanfall2 game files
#[tauri::command]
@@ -59,7 +58,9 @@ pub fn clean_up_download_folder(
download_dir_contents.for_each(|_| count += 1);
if count > 0 && !force {
- return Err(anyhow!("Folder not empty, not deleting"));
+ // Skip folder if not empty
+ log::warn!("Folder not empty, not deleting: {directory}");
+ continue;
}
// Delete folder