From 994d3cc1051634b700f5f51754abac1e79b36098 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 10 Feb 2025 20:12:36 +0800 Subject: [PATCH] fix --- test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test.py b/test.py index 590c216..44a4308 100644 --- a/test.py +++ b/test.py @@ -210,8 +210,7 @@ class comicInfo: # 创建临时文件处理覆盖操作 with NamedTemporaryFile(delete=False) as tmp: tmp.close() - shutil.move(cbz_path, tmp.name) - time.sleep(0.2) + os.replace(cbz_path, tmp.name) # 读取原文件并替换 ComicInfo.xml with ZipFile(tmp.name, 'r') as source_zip: with ZipFile(output_path, 'w') as new_zip: