src/client/http_client.rs: fix dynamic index checksum

This commit is contained in:
Dietmar Maurer 2019-09-03 13:10:18 +02:00
parent c77563146b
commit a3e032b754
1 changed files with 4 additions and 1 deletions

View File

@ -953,7 +953,10 @@ impl BackupClient {
let mut guard = index_csum.lock().unwrap();
let csum = guard.as_mut().unwrap();
csum.update(&offset.to_le_bytes());
let chunk_end = offset + chunk_len as u64;
csum.update(&chunk_end.to_le_bytes());
csum.update(digest);
let chunk_is_known = known_chunks.contains(digest);