From 883253aca8717eb5c04bd307cd4eea15077f27d0 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Fri, 16 Sep 2022 04:14:38 +0900 Subject: [PATCH] volare/manage: skip directory when extracting --- volare/manage.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/volare/manage.py b/volare/manage.py index 4da1aa6..32f7cfc 100644 --- a/volare/manage.py +++ b/volare/manage.py @@ -260,9 +260,10 @@ def enable( final_path = os.path.join(version_directory, file.name) final_dir = os.path.dirname(final_path) mkdirp(final_dir) - with tf.extractfile(file) as io: - with open(final_path, "wb") as f: - f.write(io.read()) + if file.isfile(): + with tf.extractfile(file) as io: + with open(final_path, "wb") as f: + f.write(io.read()) for variant in variants: variant_install_path = os.path.join(