Don't use extractall

This commit is contained in:
Howard Wu 2023-03-26 20:55:40 +08:00
parent 86759ad241
commit c04ad6660d
2 changed files with 6 additions and 3 deletions

View file

@ -92,4 +92,7 @@ with zipfile.ZipFile(zip_path) as zip:
stat = Path(zip_path).stat()
print(f"stat {zip_path}: {stat}", flush=True)
print(f"unzipping from {zip_path}", flush=True)
zip.extractall(archdir)
members = zip.namelist()
for member in members:
print(f"extracting {member}", flush=True)
zip.extract(member, archdir)

View file

@ -28,8 +28,8 @@ import re
from pathlib import Path
arch = sys.argv[1]
download_dir = Path.cwd().parent / \
"download" if sys.argv[2] == "" else Path(sys.argv[2])
arg2 = sys.argv[2]
download_dir = Path.cwd().parent / "download" if arg2 == "" else Path(arg2)
tempScript = sys.argv[3]
kernelVersion = sys.argv[4]
file_name = sys.argv[5]