fix
This commit is contained in:
1 parent
b38e695468
commit
74abe11880
1 file changed
+4
-1
+4
-1
@@ -94,7 +94,7 @@ class CBZUtils:
|
|||||||
@classmethod
|
@classmethod
|
||||||
def replaceZip(cls,filepath,unpack_dir=None):
|
def replaceZip(cls,filepath,unpack_dir=None):
|
||||||
if os.path.exists(filepath):
|
if os.path.exists(filepath):
|
||||||
ctime = os.path.getctime(filepath)
|
ctime = os.path.getmtime(filepath)
|
||||||
str_ctime = datetime.fromtimestamp(int(ctime))
|
str_ctime = datetime.fromtimestamp(int(ctime))
|
||||||
file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day)
|
file_ctime = str(str_ctime.year)+"{:0>2d}".format(str_ctime.month)+"{:0>2d}".format(str_ctime.day)
|
||||||
c_ctime = 20230117
|
c_ctime = 20230117
|
||||||
@@ -115,6 +115,9 @@ class CBZUtils:
|
|||||||
if not is_file and os.path.exists(filepath):
|
if not is_file and os.path.exists(filepath):
|
||||||
os.remove(filepath)
|
os.remove(filepath)
|
||||||
print(f"数据不完整,已删除:{filepath}")
|
print(f"数据不完整,已删除:{filepath}")
|
||||||
|
if is_file and os.path.exists(filepath):
|
||||||
|
os.utime(filepath)
|
||||||
|
print(f"已更新文件时间 {filepath}")
|
||||||
if os.path.exists(unpack_dir):
|
if os.path.exists(unpack_dir):
|
||||||
shutil.rmtree(unpack_dir)
|
shutil.rmtree(unpack_dir)
|
||||||
# 删除删除main.ftl文件
|
# 删除删除main.ftl文件
|
||||||
|
|||||||
Reference in new issue
Block a user