Unzip all existing zip files before processing

This commit is contained in:
Hoang Hong Quan
2024-11-09 17:25:55 +07:00
parent 3969760a1f
commit 82cd2feefa

View File

@@ -182,7 +182,17 @@ class gatheringFiles:
zip_path = os.path.join(self.temporary_dir, product_name) + ".zip"
self.fetcher.download_and_save_file(product_download_url, zip_path)
self.utils.extract_zip_file(zip_path)
while True:
zip_files = self.utils.find_matching_paths(os.path.join(self.temporary_dir, product_name), extension_filter=".zip")
if not zip_files:
break
for zip_file, file_type in zip_files:
full_zip_path = os.path.join(self.temporary_dir, product_name, zip_file)
self.utils.extract_zip_file(full_zip_path)
os.remove(full_zip_path)
if "OpenCore" in product_name:
ocbinarydata_dir = os.path.join(self.temporary_dir, "OcBinaryData")