From 37e5f80704234231cf42bceb6fbbdf3a93771a2e Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Thu, 3 Aug 2023 19:43:17 +0200 Subject: 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 --- src-tauri/src/repair_and_verify/mod.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src-tauri/src/repair_and_verify/mod.rs') 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 -- cgit v1.2.3