From fbd5bfd382d8031430bbb62650f6570a6d8bb7e5 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 22 Nov 2021 17:57:23 +0100 Subject: [PATCH] WebHost: remove duplicate zfile read --- WebHostLib/upload.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WebHostLib/upload.py b/WebHostLib/upload.py index 8e461071..eef912c2 100644 --- a/WebHostLib/upload.py +++ b/WebHostLib/upload.py @@ -65,8 +65,8 @@ def upload_zip_to_db(zfile: zipfile.ZipFile, owner=None, meta={"race": False}, s MultiServer.Context._decompress(multidata) except: flash("Could not load multidata. File may be corrupted or incompatible.") - else: - multidata = zfile.open(file).read() + multidata = None + if multidata: flush() # commit slots seed = Seed(multidata=multidata, spoiler=spoiler, slots=slots, owner=owner, meta=json.dumps(meta),