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()} 下载出错了")