From 5899fd913ba1ad5f2556189ce2a412b38aa1b84b Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 16 Jan 2023 04:17:03 +0800 Subject: [PATCH] fix --- utils/CBZUtils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/utils/CBZUtils.py b/utils/CBZUtils.py index 1b7d032..b137109 100644 --- a/utils/CBZUtils.py +++ b/utils/CBZUtils.py @@ -1,5 +1,5 @@ import json -import os,shutil +import os,shutil,time from datetime import datetime from pathlib import Path from zipfile import ZipFile @@ -99,7 +99,9 @@ class CBZUtils: fz = ZipFile(filepath, 'r') for file in fz.namelist(): if file.endswith(".jpg"): - is_file = fileUtils.ver_file(fz.read(file),"image") + data = fz.read(file) + time.sleep(1) + is_file = fileUtils.ver_file(data,"image") if not is_file and os.path.exists(filepath): os.remove(filepath) print(f"数据不完整,已删除:{filepath}")