From fa793ce4bc28b4e5bfdaed8c37d75f5c3691cae2 Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Fri, 30 Aug 2024 00:03:13 +0200 Subject: [PATCH] delete .iw4xrevision --- src/main.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1005f33..ed662db 100644 --- a/src/main.rs +++ b/src/main.rs @@ -324,11 +324,14 @@ async fn update( std::process::exit(0); } - if dir.join(".sha-sums").exists() { - match fs::remove_file(dir.join(".sha-sums")) { - Ok(_) => {} - Err(error) => { - crate::println_error!("Error removing .sha-sums: {error}"); + let old_files = [".sha-sums", ".iw4xrevision"]; + for f in old_files { + if dir.join(f).exists() { + match fs::remove_file(dir.join(f)) { + Ok(_) => {} + Err(error) => { + crate::println_error!("Error removing {f}: {error}"); + } } } }