src/backup/data_blob.rs - encode: always compute crc

This commit is contained in:
Dietmar Maurer 2019-08-07 08:29:38 +02:00
parent 38a6cddad7
commit eecb23560b

View File

@ -128,7 +128,9 @@ impl DataBlob {
zstd::stream::copy_encode(data, &mut comp_data, 1)?;
if comp_data.len() < max_data_len {
return Ok(DataBlob { raw_data: comp_data });
let mut blob = DataBlob { raw_data: comp_data };
blob.set_crc(blob.compute_crc());
return Ok(blob);
}
}