diff options
author | Jan <sentrycraft123@gmail.com> | 2023-08-09 00:02:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-09 00:02:14 +0200 |
commit | b10f5ef01fa6cd3034526f79e5439d760855dcdc (patch) | |
tree | 6135b4459acd32bd7fcd21ad73f66fd82265b6d1 /src-tauri | |
parent | 24fb67f88ceca9bec04b49fae5b58759b7b25ec5 (diff) | |
download | FlightCore-b10f5ef01fa6cd3034526f79e5439d760855dcdc.tar.gz FlightCore-b10f5ef01fa6cd3034526f79e5439d760855dcdc.zip |
fix: Ignore missing temp directories on cleanup (#488)
When a directory couldn't be read on cleanup it errored out. Instead we should continue to clean up the rest of the directories
Diffstat (limited to 'src-tauri')
-rw-r--r-- | src-tauri/src/repair_and_verify/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src-tauri/src/repair_and_verify/mod.rs b/src-tauri/src/repair_and_verify/mod.rs index 8b68ce59..70abc127 100644 --- a/src-tauri/src/repair_and_verify/mod.rs +++ b/src-tauri/src/repair_and_verify/mod.rs @@ -51,7 +51,10 @@ pub fn clean_up_download_folder( let download_directory = format!("{}/{}/", game_install.game_path, directory); // Check if files in folder - let download_dir_contents = std::fs::read_dir(download_directory.clone())?; + let download_dir_contents = match std::fs::read_dir(download_directory.clone()) { + Ok(contents) => contents, + Err(_) => continue, + }; // dbg!(download_dir_contents); let mut count = 0; |