From b6e5cb90d143d8b26df27a5e3db9593632703ae1 Mon Sep 17 00:00:00 2001 From: Thephaseless Date: Sat, 19 Oct 2024 20:49:50 +0000 Subject: [PATCH] path fixes --- src/utils/extentions.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils/extentions.py b/src/utils/extentions.py index 3a6e2c7..08ad5ca 100644 --- a/src/utils/extentions.py +++ b/src/utils/extentions.py @@ -85,8 +85,9 @@ def download_extentions(): continue Path(EXTENTIONS_PATH).mkdir(exist_ok=True) with ZipFile(io.BytesIO(zip_file.content)) as zip_obj: - zip_obj.extractall(f"{EXTENTIONS_PATH}/{extention_name}") - logger.debug(f"Extracted {extention_name} to {path}") + if not path.joinpath(extention_name).exists(): + zip_obj.extractall(f"{EXTENTIONS_PATH}/{extention_name}") + logger.debug(f"Extracted {extention_name} to {path}") logger.info(f"Successfully downloaded {extention_name} to {path}") downloaded_extentions.append(path.as_posix())