src/backup/data_{chunk,blob}.rs: add verify_crc method

This commit is contained in:
Dietmar Maurer
2019-06-26 09:54:25 +02:00
parent fef44d4f78
commit b208da8393
3 changed files with 19 additions and 0 deletions

View File

@ -708,6 +708,7 @@ fn download(
let writer = Vec::with_capacity(1024*1024);
let blob_data = client.download(&path, writer).wait()?;
let blob = DataBlob::from_raw(blob_data)?;
blob.verify_crc()?;
let raw_data = blob.decode(crypt_config.as_ref())?; // fixme
crate::tools::file_set_contents(target, &raw_data, None)?;