From 6867f8bc1f2fffef9e11c136638a7b0fdc283c17 Mon Sep 17 00:00:00 2001 From: tcmyxc <1282494272@qq.com> Date: Thu, 29 Sep 2022 20:58:51 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=96=87=E4=BB=B6=E8=B7=AF?= =?UTF-8?q?=E5=BE=84=E6=9C=89=E7=A9=BA=E6=A0=BC=E5=AF=BC=E8=87=B4=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=BD=AC=E6=8D=A2=E6=A0=BC=E5=BC=8F=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kfb2tif.py | 4 ++-- main.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kfb2tif.py b/kfb2tif.py index d4f39c2..acfeaba 100644 --- a/kfb2tif.py +++ b/kfb2tif.py @@ -60,7 +60,7 @@ def click_btn(self): print(f"正在转换第 {ok_cnt+1} 个文件, 一共有 {file_cnt} 个文件") tif_dest_path = kfb_file.replace(root_path, f"{root_path}/tif") tif_dest_path = tif_dest_path.replace(".kfb", ".tif") - command = f"{exe_path} {kfb_file} {tif_dest_path} {level}" + command = f'{exe_path} "{kfb_file}" "{tif_dest_path}" {level}' # 加双引号避免文件路径有空格 p = subprocess.Popen(command) p.wait() ok_cnt += 1 @@ -68,7 +68,7 @@ def click_btn(self): self.advanceProgressBar() print() - print("所有文件已经转换成功!!!") + print("\n所有文件已经转换成功!!!") def advanceProgressBar(self): curVal = self.progressBar.value() diff --git a/main.py b/main.py index 8d5723c..e84c9a5 100644 --- a/main.py +++ b/main.py @@ -60,7 +60,7 @@ def click_btn(self): print(f"正在转换第 {ok_cnt+1} 个文件, 一共有 {file_cnt} 个文件") svs_dest_path = kfb_file.replace(root_path, f"{root_path}/svs") svs_dest_path = svs_dest_path.replace(".kfb", ".svs") - command = f"{exe_path} {kfb_file} {svs_dest_path} {level}" + command = f'{exe_path} "{kfb_file}" "{svs_dest_path}" {level}' # 加双引号避免文件路径有空格 p = subprocess.Popen(command) p.wait() ok_cnt += 1