Skip to content

Commit 7b1cb03

Browse files
author
Marcin Kardas
committed
Fix single file source archives
1 parent 6f3a3f3 commit 7b1cb03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sota_extractor2/helpers/unpack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __call__(self, source, dest):
2525
tar.extractall(dest)
2626
elif mime == 'text/x-tex':
2727
dest.mkdir(parents=True, exist_ok=True)
28-
with gzip.open(source, "rb") as src, open(dest / "main.tex") as dst:
28+
with gzip.open(source, "rb") as src, open(dest / "main.tex", "wb") as dst:
2929
copyfileobj(src, dst)
3030
else:
3131
raise UnpackError(f"Cannot unpack file of type {mime}")

0 commit comments

Comments
 (0)