This commit is contained in:
caiwx86 2023-01-16 03:00:35 +08:00
parent 6dd86c5ee2
commit b38e695468

View File

@ -93,11 +93,14 @@ class CBZUtils:
@classmethod
def replaceZip(cls,filepath,unpack_dir=None):
ctime = os.path.getctime(filepath)
str_ctime = datetime.fromtimestamp(int(ctime))
file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day)
c_ctime = 20230117
if int(file_ctime) < c_ctime:
if os.path.exists(filepath):
ctime = os.path.getctime(filepath)
str_ctime = datetime.fromtimestamp(int(ctime))
file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day)
c_ctime = 20230117
if int(file_ctime) < c_ctime:
return None
else:
return None
if unpack_dir == None:
unpack_dir = str(filepath).split(".")[0]