diff --git a/src/api2/backup/environment.rs b/src/api2/backup/environment.rs index dc8a0176..0260ac6e 100644 --- a/src/api2/backup/environment.rs +++ b/src/api2/backup/environment.rs @@ -400,9 +400,9 @@ impl BackupEnvironment { let blob_len = data.len(); let orig_len = data.len(); // fixme: - let mut blob = DataBlob::from_raw(data)?; - // always comput CRC at server side - blob.set_crc(blob.compute_crc()); + let blob = DataBlob::from_raw(data)?; + // always verify CRC at server side + blob.verify_crc()?; let raw_data = blob.raw_data(); file_set_contents(&path, raw_data, None)?;