diff --git a/src/borg/chunkers/buzhash.pyx b/src/borg/chunkers/buzhash.pyx index 8a30594bc..4df5c629c 100644 --- a/src/borg/chunkers/buzhash.pyx +++ b/src/borg/chunkers/buzhash.pyx @@ -232,8 +232,7 @@ cdef class Chunker: raise Exception("chunkifier byte count mismatch") while self.remaining < min_size + window_size + 1 and not self.eof: # see assert in Chunker init - if not self.fill(): - return None + self.fill() # Here we either are at eof... if self.eof: @@ -268,8 +267,7 @@ cdef class Chunker: self.remaining -= did_bytes if self.remaining <= window_size: - if not self.fill(): - return None + self.fill() if self.remaining <= window_size: self.position += self.remaining diff --git a/src/borg/chunkers/buzhash64.pyx b/src/borg/chunkers/buzhash64.pyx index 1a1ce8fc9..d94cde483 100644 --- a/src/borg/chunkers/buzhash64.pyx +++ b/src/borg/chunkers/buzhash64.pyx @@ -237,8 +237,7 @@ cdef class ChunkerBuzHash64: raise Exception("chunkifier byte count mismatch") while self.remaining < min_size + window_size + 1 and not self.eof: # see assert in Chunker init - if not self.fill(): - return None + self.fill() # Here we either are at eof... if self.eof: @@ -294,8 +293,7 @@ cdef class ChunkerBuzHash64: self.remaining -= did_bytes if self.remaining <= window_size: - if not self.fill(): - return None + self.fill() if self.remaining <= window_size: self.position += self.remaining diff --git a/src/borg/chunkers/fastcdc.pyx b/src/borg/chunkers/fastcdc.pyx index 2248ff540..69d4b6d9c 100644 --- a/src/borg/chunkers/fastcdc.pyx +++ b/src/borg/chunkers/fastcdc.pyx @@ -175,8 +175,7 @@ cdef class ChunkerFastCDC: # ensure at least min_size + 1 bytes are buffered, or we are at eof while self.remaining < min_size + 1 and not self.eof: - if not self.fill(): - return None + self.fill() # at eof with only a remainder (< min_size + 1): emit it as the final chunk if self.eof and self.remaining < min_size + 1: @@ -207,8 +206,7 @@ cdef class ChunkerFastCDC: if self.remaining == 0: if self.eof: break # cut at end of data - if not self.fill(): - return None + self.fill() if self.remaining == 0: break # buffer full -> chunk reached max_size -> forced cut continue