fix
This commit is contained in:
parent
ea6469ddbb
commit
f268cc7a31
@ -508,7 +508,7 @@ class CBZUtils:
|
|||||||
logging.info(f"打包完成:{target_file}")
|
logging.info(f"打包完成:{target_file}")
|
||||||
if int(count_files) <= int(min_files):
|
if int(count_files) <= int(min_files):
|
||||||
try:
|
try:
|
||||||
os.path.remove(target_file)
|
os.remove(target_file)
|
||||||
logging.info(f"{target_file} 文件不符合最小文件数规则,已删除")
|
logging.info(f"{target_file} 文件不符合最小文件数规则,已删除")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"{target_file} 删除报错")
|
logging.error(f"{target_file} 删除报错")
|
||||||
@ -550,7 +550,7 @@ class CBZUtils:
|
|||||||
try:
|
try:
|
||||||
return cls.comic_cbz_validate(dts_path)
|
return cls.comic_cbz_validate(dts_path)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
os.path.remove(dts_path)
|
os.remove(dts_path)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def replaceZip(cls, filepath, unpack_dir=None):
|
def replaceZip(cls, filepath, unpack_dir=None):
|
||||||
|
|||||||
@ -25,7 +25,7 @@ class ComicsPipeline():
|
|||||||
# 使用 os.path.getsize() 获取文件大小(以字节为单位)
|
# 使用 os.path.getsize() 获取文件大小(以字节为单位)
|
||||||
file_size = os.path.getsize(file_path)
|
file_size = os.path.getsize(file_path)
|
||||||
if file_size < min_size:
|
if file_size < min_size:
|
||||||
os.path.remove(file_path)
|
os.remove(file_path)
|
||||||
logging.info(f"清除错误文件: {file_path}")
|
logging.info(f"清除错误文件: {file_path}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"获取文件大小失败: {e}")
|
print(f"获取文件大小失败: {e}")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user