Skip to content

Commit

Permalink
fix(handler): improve tar handler to support sparse archives.
Browse files Browse the repository at this point in the history
  • Loading branch information
qkaiser committed Dec 16, 2023
1 parent 41004be commit 2b5a2fa
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions tests/integration/archive/tar/__input__/sparse.tar
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 1 addition & 2 deletions unblob/handlers/archive/tar.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def _get_end_of_last_tar_entry(file) -> int:
if last_member is None:
return -1

last_file_size = round_up(last_member.size, BLOCK_SIZE)
end_of_last_tar_entry = last_member.offset_data + last_file_size
end_of_last_tar_entry = tf.offset
try:
file.seek(end_of_last_tar_entry)
except SeekError:
Expand Down

0 comments on commit 2b5a2fa

Please sign in to comment.