From f04092355ba11ded080f12701fc24a2bccee4a56 Mon Sep 17 00:00:00 2001 From: "Dusty.P" Date: Wed, 9 May 2018 21:49:24 -0800 Subject: [PATCH] Fix error in saving original zip files --- exts/uploader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/exts/uploader.py b/exts/uploader.py index e5f5462..c8ad72e 100644 --- a/exts/uploader.py +++ b/exts/uploader.py @@ -23,8 +23,9 @@ class Uploader: 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 open(f'{storage_dir}/orig/{attachment.filename}_' + f'{ctx.message.created_at.strftime("%Y%m%dT%H%M%S")}', 'wb') as file: + await attachment.save(file) with BytesIO() as file: await attachment.save(file) unzipped = process_files.load_zip(file)