fix install on older systems

This commit is contained in:
Mateusz Gruszczyński
2025-10-26 15:37:29 +01:00
parent 1d7273be1f
commit 36e3315dca

View File

@@ -265,7 +265,7 @@ def download_extract_tar_gz(url: str, dest_dir: Path) -> Path:
with tarfile.open(tf_path, "r:gz") as t: with tarfile.open(tf_path, "r:gz") as t:
try: try:
t.extractall(dest_dir, filter="data") t.extractall(dest_dir, filter="data")
except TypeError: except (TypeError, tarfile.LinkOutsideDestinationError):
t.extractall(dest_dir) t.extractall(dest_dir)
top = t.getmembers()[0].name.split("/")[0] top = t.getmembers()[0].name.split("/")[0]
os.unlink(tf_path) os.unlink(tf_path)