mirror of https://github.com/borgbackup/borg.git
file_integrity: hash_part: mix length into state
This commit is contained in:
parent
d463dd89aa
commit
83bca02a4e
|
@ -152,6 +152,7 @@ class IntegrityCheckedFile(FileLikeWrapper):
|
|||
def hash_part(self, partname, is_final=False):
|
||||
if not self.writing and not self.digests:
|
||||
return
|
||||
self.hasher.update(('%10d' % len(partname)).encode())
|
||||
self.hasher.update(partname.encode())
|
||||
self.hasher.hash_length(seek_to_end=is_final)
|
||||
digest = self.hasher.hexdigest()
|
||||
|
|
Loading…
Reference in New Issue