From 2725967df5098d0d1472bd81e85cc6c6108c6cef Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Thu, 1 Jul 2021 10:32:46 +0800 Subject: [PATCH] Update data_source.py --- plugins/send_setu/data_source.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/send_setu/data_source.py b/plugins/send_setu/data_source.py index ab00f00a..206aae3d 100644 --- a/plugins/send_setu/data_source.py +++ b/plugins/send_setu/data_source.py @@ -118,6 +118,8 @@ async def search_online_setu(url: str): def get_setu(index: str, setu_data: dict, tag: str = None): + if not os.path.exists(IMAGE_PATH + path): + os.mkdir(IMAGE_PATH + path) length = len(os.listdir(IMAGE_PATH + path)) if length == 0: return None, None