From bb6e7aef41906df7930a2a055df8ffbc43cbf449 Mon Sep 17 00:00:00 2001 From: "Dusty.P" Date: Wed, 9 May 2018 21:22:01 -0800 Subject: [PATCH] Fix error in saving original zip files --- exts/uploader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exts/uploader.py b/exts/uploader.py index 5c9660d..e5f5462 100644 --- a/exts/uploader.py +++ b/exts/uploader.py @@ -21,6 +21,8 @@ class Uploader: attachment = ctx.message.attachments[0] if attachment.filename.endswith('.zip'): async with ctx.typing(): + if not os.path.isdir(f'{storage_dir}/orig/'): + os.mkdir(f'{storage_dir}/orig/') with open(f'{storage_dir}/orig/{attachment.filename}', 'wb') as file: attachment.save(file) with BytesIO() as file: