fix
This commit is contained in:
parent
f1029fa291
commit
4fa9bf4f3f
@ -98,12 +98,8 @@ class CBZUtils:
|
||||
unpack_dir = str(filepath).split(".")[0]
|
||||
fz = ZipFile(filepath, 'r')
|
||||
for file in fz.namelist():
|
||||
fz.extract(file, unpack_dir)
|
||||
zip_imgs = os.listdir(unpack_dir)
|
||||
for img in zip_imgs:
|
||||
if img.endswith(".jpg"):
|
||||
img_path = os.path.join(unpack_dir,img)
|
||||
is_file = fileUtils.ver_file(img_path,"image")
|
||||
if file.endswith(".jpg"):
|
||||
is_file = fileUtils.ver_file(fz.read(file),"image")
|
||||
if not is_file and os.path.exists(filepath):
|
||||
os.remove(filepath)
|
||||
print(f"数据不完整,已删除:{filepath}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user