src/backup/chunk_store.rs: read_chunk - clear buffer before calling read_to_end

This commit is contained in:
Dietmar Maurer 2019-03-07 10:40:01 +01:00
parent dc04ce7fe5
commit d2690f74bb
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ impl ChunkStore {
let digest_str = tools::digest_to_hex(&digest);
chunk_path.push(&digest_str);
buffer.clear();
let f = std::fs::File::open(&chunk_path)?;
let mut decoder = lz4::Decoder::new(f)?;