Skip to content

Commit

Permalink
[performance] SQLiteIndexedTar: Avoid reading the whole appended TAR …
Browse files Browse the repository at this point in the history
…parts into memory for the check
  • Loading branch information
mxmlnkn committed Sep 10, 2024
1 parent dfa4c4a commit 8fcc407
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/ratarmountcore/SQLiteIndexedTar.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,7 +1299,7 @@ def _checkMetadata2(self, metadata: Dict[str, Any]) -> None:
oldOffset = self.tarFileObject.tell()
try:
with StenciledFile(fileStencils=[fileStencil]) as file:
if file.read() != b"\0" * 1024:
if file.read(1025) != b"\0" * 1024:
if self.printDebug >= 2:
print(
"[Info] Probably has been appended to because no EOF zero-byte blocks could "
Expand Down

0 comments on commit 8fcc407

Please sign in to comment.