From edc16f683cb439510d61002f2007b03da5365d39 Mon Sep 17 00:00:00 2001 From: caiwx86 Date: Mon, 9 Jan 2023 22:06:38 +0800 Subject: [PATCH] fix --- utils/entity/RouMan.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/entity/RouMan.py b/utils/entity/RouMan.py index f57652a..a89ffdc 100644 --- a/utils/entity/RouMan.py +++ b/utils/entity/RouMan.py @@ -122,8 +122,9 @@ class comicEntity: is_next = CBZUtils.packAutoComicChapterCBZ() #完成删除原文件 remove_path = comicInfo.getDirComicChapter() - shutil.rmtree(remove_path) - print(f"文件已删除: {remove_path}") + if os.path.exists(remove_path): + shutil.rmtree(remove_path) + print(f"文件已删除: {remove_path}") #except Exception as e: # print(e) # ntfy.sendMsg(f"{comicInfo.getComicName()} 下载出错了")