diff --git a/test.py b/test.py index def2911..7f8fdff 100644 --- a/test.py +++ b/test.py @@ -210,7 +210,7 @@ class comicInfo: # 创建临时文件处理覆盖操作 with NamedTemporaryFile(delete=False) as tmp: tmp.close() - shutil.copy(cbz_path, tmp.name) + shutil.move(cbz_path, tmp.name) # 读取原文件并替换 ComicInfo.xml with ZipFile(tmp.name, 'r') as source_zip: @@ -228,7 +228,7 @@ class comicInfo: except Exception as e: print(f"更新 CBZ 文件失败: {e}") if os.path.exists(tmp.name): - os.replace(tmp.name, cbz_path) # 恢复备份 + shutil.move(tmp.name, cbz_path) # 恢复备份 return False def update_comicinfo_cbz(self, cbz_path):