This commit is contained in:
cwx committed 2023-01-16 03:00:35 +08:00
1 parent 6dd86c5ee2
commit b38e695468
1 file changed
+8 -5
+8 -5
View File
@@ -93,11 +93,14 @@ class CBZUtils:
@classmethod @classmethod
def replaceZip(cls,filepath,unpack_dir=None): def replaceZip(cls,filepath,unpack_dir=None):
ctime = os.path.getctime(filepath) if os.path.exists(filepath):
str_ctime = datetime.fromtimestamp(int(ctime)) ctime = os.path.getctime(filepath)
file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day) str_ctime = datetime.fromtimestamp(int(ctime))
c_ctime = 20230117 file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day)
if int(file_ctime) < c_ctime: c_ctime = 20230117
if int(file_ctime) < c_ctime:
return None
else:
return None return None
if unpack_dir == None: if unpack_dir == None:
unpack_dir = str(filepath).split(".")[0] unpack_dir = str(filepath).split(".")[0]