Extract all contents from zip file when downloading Chromedriver

Extracting just one file that was in a directory caused an error on
Windows. Extracting all fixes this issue.
This commit is contained in:
jdholtz 2023-08-16 11:05:49 -05:00
parent 9102a51636
commit f91b7d86bc
No known key found for this signature in database
GPG Key ID: A3A87CFD1E4A1B65
1 changed files with 1 additions and 1 deletions

View File

@ -323,7 +323,7 @@ class Patcher(object):
os.makedirs(self.zip_path, mode=0o755, exist_ok=True)
with zipfile.ZipFile(fp, mode="r") as zf:
zf.extract(exe_path, self.zip_path)
zf.extractall(self.zip_path)
os.rename(os.path.join(self.zip_path, exe_path), self.executable_path)
os.remove(fp)
shutil.rmtree(self.zip_path)