Skip to content

Commit

Permalink
Merge branch 'main' into validate_inner_tar
Browse files Browse the repository at this point in the history
  • Loading branch information
agners authored Jan 14, 2025
2 parents b328f6e + 279ba59 commit 300b197
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions securetar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __init__(self, parent: SecureTarFile) -> None:
self._parent = parent
self._pos = 0
self._size = tarinfo.size - IV_SIZE
self._tail = b""
self._tail: bytes | None = None

@staticmethod
def _validate_inner_tar(head: bytes) -> None:
Expand All @@ -217,7 +217,7 @@ def read(self, size: int = 0) -> bytes:
self._head = self._parent.read(max(size, 512))
self._validate_inner_tar(self._head)

if self._tail:
if self._tail is not None:
# Finish reading tail
data = self._tail[:size]
self._tail = self._tail[size:]
Expand Down

0 comments on commit 300b197

Please sign in to comment.