path fixes

This commit is contained in:
Thephaseless 2024-10-19 20:49:50 +00:00
parent 3325e8c04c
commit b6e5cb90d1

View File

@ -85,8 +85,9 @@ def download_extentions():
continue continue
Path(EXTENTIONS_PATH).mkdir(exist_ok=True) Path(EXTENTIONS_PATH).mkdir(exist_ok=True)
with ZipFile(io.BytesIO(zip_file.content)) as zip_obj: with ZipFile(io.BytesIO(zip_file.content)) as zip_obj:
zip_obj.extractall(f"{EXTENTIONS_PATH}/{extention_name}") if not path.joinpath(extention_name).exists():
logger.debug(f"Extracted {extention_name} to {path}") 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}") logger.info(f"Successfully downloaded {extention_name} to {path}")
downloaded_extentions.append(path.as_posix()) downloaded_extentions.append(path.as_posix())