don't panic if cleaning up left over files fails

This commit is contained in:
mxve 2023-11-06 02:08:29 +01:00
parent b1cffb44ad
commit b3168b0a58

View File

@ -43,7 +43,9 @@ pub fn run(update_only: bool) {
&& (file_name.contains(".__relocated__.exe") && (file_name.contains(".__relocated__.exe")
|| file_name.contains(".__selfdelete__.exe")) || file_name.contains(".__selfdelete__.exe"))
{ {
fs::remove_file(file.path()).unwrap(); fs::remove_file(file.path()).unwrap_or_else(|_| {
println!("Failed to remove old launcher file.");
});
} }
} }