X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=lib%2Fbup%2Fhashsplit.py;h=01e11a67c6ea89884edb8fd6e1aa9373d0fa4b58;hb=d83b0a2939617be2ed1602f8cf746334a73697ee;hp=0ae6acdb669a624a58688e3bc760ba01d0a35ddd;hpb=fc5518c3179ac4ea958a455ad4b931e22c32e216;p=bup.git diff --git a/lib/bup/hashsplit.py b/lib/bup/hashsplit.py index 0ae6acd..01e11a6 100644 --- a/lib/bup/hashsplit.py +++ b/lib/bup/hashsplit.py @@ -29,7 +29,10 @@ class Buf: self.start = 0 def put(self, s): - if s: + if not self.data: + self.data = s + self.start = 0 + elif s: remaining = len(self.data) - self.start self.data = cat_bytes(self.data, self.start, remaining, s, 0, len(s))