From ff86ef00a7ce59a5070684f8418883a42c0c42c7 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 31 Jul 2020 10:25:30 +0200 Subject: [PATCH] cleanup: manifest is always CryptMode::None --- src/api2/admin/datastore.rs | 4 ++-- src/backup/datastore.rs | 6 ++---- src/backup/verify.rs | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index cf7f731a..55a8b8e0 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -46,7 +46,7 @@ fn check_backup_owner(store: &DataStore, group: &BackupGroup, userid: &str) -> R fn read_backup_index(store: &DataStore, backup_dir: &BackupDir) -> Result, Error> { - let (manifest, manifest_crypt_mode, index_size) = store.load_manifest(backup_dir)?; + let (manifest, index_size) = store.load_manifest(backup_dir)?; let mut result = Vec::new(); for item in manifest.files() { @@ -59,7 +59,7 @@ fn read_backup_index(store: &DataStore, backup_dir: &BackupDir) -> Result Result<(BackupManifest, CryptMode, u64), Error> { + ) -> Result<(BackupManifest, u64), Error> { let blob = self.load_blob(backup_dir, MANIFEST_BLOB_NAME)?; let raw_size = blob.raw_size(); - let crypt_mode = blob.crypt_mode()?; let manifest = BackupManifest::try_from(blob)?; - Ok((manifest, crypt_mode, raw_size)) + Ok((manifest, raw_size)) } pub fn load_manifest_json( diff --git a/src/backup/verify.rs b/src/backup/verify.rs index cba1297f..0617fbf6 100644 --- a/src/backup/verify.rs +++ b/src/backup/verify.rs @@ -145,7 +145,7 @@ pub fn verify_backup_dir( ) -> Result { let manifest = match datastore.load_manifest(&backup_dir) { - Ok((manifest, _crypt_mode, _)) => manifest, + Ok((manifest, _)) => manifest, Err(err) => { worker.log(format!("verify {}:{} - manifest load error: {}", datastore.name(), backup_dir, err)); return Ok(false);