From 06c3a5174c232190120e02a11fc1b6bd1f3656e9 Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Wed, 16 Jun 2021 15:55:59 +0200 Subject: [PATCH] only remove auto-add dir if it exist --- source/patch_file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/patch_file.py b/source/patch_file.py index 800e844..7ac60eb 100644 --- a/source/patch_file.py +++ b/source/patch_file.py @@ -38,7 +38,7 @@ def patch_file(self): for file in glob.glob(self.path_mkwf+"/files/Scene/UI/MenuSingle_?.szs"): self.patch_bmg(file) - shutil.rmtree("./file/auto-add") + if os.path.exists("./file/auto-add"): shutil.rmtree("./file/auto-add") if not(os.path.exists(self.path_mkwf + "/tmp/")): os.makedirs(self.path_mkwf + "/tmp/") subprocess.run(["./tools/szs/wszst", "AUTOADD", get_nodir(self.path_mkwf) + "/files/Race/Course/", "--DEST", get_nodir(self.path_mkwf) + "/tmp/auto-add/"],