From ea24215e215e0f2909113d5eff027ca9b2ef9828 Mon Sep 17 00:00:00 2001 From: amcmanu3 Date: Tue, 5 Jul 2022 14:55:17 -0400 Subject: [PATCH] Remove default backup dir location --- app/classes/shared/main_controller.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/classes/shared/main_controller.py b/app/classes/shared/main_controller.py index c15f3009..692ca79d 100644 --- a/app/classes/shared/main_controller.py +++ b/app/classes/shared/main_controller.py @@ -792,6 +792,11 @@ class Controller: backup_path_components[-1] = new_uuid new_bu_path = pathlib.PurePath(os.path.join(*backup_path_components)) server_obj.backup_path = new_bu_path + default_backup_dir = os.path.join(self.helper.backup_path, new_uuid) + try: + os.rmdir(default_backup_dir) + except: + logger.error("Could not delete default backup dir") self.servers.update_server(server_obj) backup_path.rename(new_bu_path)