From a8a798d4fb64c82cf1ee810acaf3f45c62ddd951 Mon Sep 17 00:00:00 2001 From: RedstoneWizard08 Date: Mon, 20 Mar 2023 17:59:44 -0700 Subject: [PATCH] Fix another error --- common/src/instances/instance.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/instances/instance.rs b/common/src/instances/instance.rs index 8029e5f..5a8d4a4 100644 --- a/common/src/instances/instance.rs +++ b/common/src/instances/instance.rs @@ -270,8 +270,10 @@ impl Instance { .join(self.id.to_string()) .join(path); - copy_dir_all(local_path.clone(), saved_path).unwrap(); - remove_dir_all(local_path).unwrap(); + if local_path.exists() { + copy_dir_all(local_path.clone(), saved_path).unwrap(); + remove_dir_all(local_path).unwrap(); + } } } }