From 96dc1d98517fd1eacb276c63265499a52d7c3ec4 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Mon, 9 Aug 2021 07:50:33 +0800 Subject: [PATCH] Update data_source.py --- plugins/send_setu/data_source.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/send_setu/data_source.py b/plugins/send_setu/data_source.py index beaf4e54..1463f5ca 100644 --- a/plugins/send_setu/data_source.py +++ b/plugins/send_setu/data_source.py @@ -90,8 +90,8 @@ async def search_online_setu( index = random.randint(1, 100000) if id_ is None else id_ path_ = "temp" if not path_ else path_ file = f"{index}_temp_setu.jpg" if not path_ else f"{index}.jpg" - if not os.path.exists(f'{IMAGE_PATH}/path_'): - os.mkdir(f'{IMAGE_PATH}/path_') + if not os.path.exists(f'{IMAGE_PATH}/{path_}'): + os.mkdir(f'{IMAGE_PATH}/{path_}') async with aiofiles.open( f"{IMAGE_PATH}/{path_}/{file}", "wb" ) as f: