summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2022-07-01 00:07:01 +0800
committerKyomotoi <[email protected]>2022-07-01 00:07:01 +0800
commite668874e51171bddf44f0c3443875b7d6e5526a4 (patch)
treeb6c2fb2b9b8a5b9a56767e3346a68e178829d497
parent78c7e1efc76da4e1311adecd500da8dd4fdca50d (diff)
downloadATRI-e668874e51171bddf44f0c3443875b7d6e5526a4.tar.gz
ATRI-e668874e51171bddf44f0c3443875b7d6e5526a4.tar.bz2
ATRI-e668874e51171bddf44f0c3443875b7d6e5526a4.zip
🐛 修复可能的无法创建目标文件夹
-rw-r--r--ATRI/plugins/console/data_source.py2
-rw-r--r--ATRI/plugins/polaroid/image_dealer.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ATRI/plugins/console/data_source.py b/ATRI/plugins/console/data_source.py
index 7dd8602..eee862c 100644
--- a/ATRI/plugins/console/data_source.py
+++ b/ATRI/plugins/console/data_source.py
@@ -12,7 +12,7 @@ from ATRI.exceptions import WriteFileError
CONSOLE_DIR = Path(".") / "data" / "plugins" / "console"
-CONSOLE_DIR.mkdir(exist_ok=True)
+CONSOLE_DIR.mkdir(parents=True, exist_ok=True)
class Console(Service):
diff --git a/ATRI/plugins/polaroid/image_dealer.py b/ATRI/plugins/polaroid/image_dealer.py
index 18fc6dc..3083f48 100644
--- a/ATRI/plugins/polaroid/image_dealer.py
+++ b/ATRI/plugins/polaroid/image_dealer.py
@@ -7,7 +7,7 @@ from PIL import Image, ImageFont, ImageDraw
POLAROID_DIR = Path(".") / "data" / "plugins" / "polaroid"
TEMP_PATH = Path(".") / "data" / "temp"
-POLAROID_DIR.mkdir(exist_ok=True)
+POLAROID_DIR.mkdir(parents=True, exist_ok=True)
def image_dealer(user_img: bytes, user_id):