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: