Skip to content

Commit

Permalink
properly decompress tgz archives
Browse files Browse the repository at this point in the history
  • Loading branch information
Magier committed Nov 16, 2024
1 parent 4c43acb commit 7162976
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/update_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,8 @@ def use_file_as_is(name, data):

def process_tarball(name: str, data: bytes) -> FilesGenerator:
compression_sfx = name.split(".")[-1]
if compression_sfx == "tgz":
compression_sfx = "gz"
mode = f"r:{compression_sfx}"
try:
with tarfile.open(fileobj=io.BytesIO(data), mode=mode) as f:
Expand Down

0 comments on commit 7162976

Please sign in to comment.