Jelajahi Sumber

ChunkerFixed: do not assert on short header read

ChunkerFixed can be configured to support files with a specific header size.

But we do not want to get an AssertionError if we encounter a 0-byte file
or a file that is shorter than the header size.
Thomas Waldmann 1 Minggu lalu
induk
melakukan
f58d26671d
1 mengubah file dengan 0 tambahan dan 1 penghapusan
  1. 0 1
      src/borg/chunker.pyx

+ 0 - 1
src/borg/chunker.pyx

@@ -433,7 +433,6 @@ class ChunkerFixed:
             self.chunking_time += time.monotonic() - started_chunking
             self.chunking_time += time.monotonic() - started_chunking
 
 
             if header_chunk.meta["size"] > 0:
             if header_chunk.meta["size"] > 0:
-                assert self.header_size == header_chunk.meta["size"]
                 # Yield the header chunk
                 # Yield the header chunk
                 yield header_chunk
                 yield header_chunk