From bcadbfb7720e03d801adb5ec9084acc5a265c6e9 Mon Sep 17 00:00:00 2001 From: raphael60650 Date: Thu, 20 May 2021 13:13:34 +0200 Subject: [PATCH] Track-WU8 will be automaticly deleted when convertion to szs is completed --- main.pyw | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.pyw b/main.pyw index e67012f..95fe308 100644 --- a/main.pyw +++ b/main.pyw @@ -74,8 +74,10 @@ class ClassApp(): if not(os.path.exists("./file/"+get_filename(file)+".bmg")): subprocess.call(["wbmgt", "ENCODE", "./file/"+file]) - subprocess.call(["wszst", "NORMALIZE", "./file/Track-WU8/*.wu8", "-d", "./file/Track/%N.szs", "--szs", - "--overwrite", "--autoadd-path", self.path_mkwf+"/files/Race/Course/"]) + if os.path.exists("./file/Track-WU8/"): + subprocess.call(["wszst", "NORMALIZE", "./file/Track-WU8/*.wu8", "-d", "./file/Track/%N.szs", "--szs", + "--overwrite", "--autoadd-path", self.path_mkwf+"/files/Race/Course/"]) + shutil.rmtree("./file/Track-WU8/") def install_mod(self):