chunk readers: ensure chunk/index CryptMode matches
an encrypted Index should never reference a plain-text chunk, and an unencrypted Index should never reference an encrypted chunk. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
1 parent
2d55beeca0
commit
14f6c9cb8b
8 files changed
+88
-22
No files matched your search
+2
-2
@@ -224,8 +224,6 @@ async fn pull_snapshot(
|
||||
|
||||
let manifest = BackupManifest::try_from(tmp_manifest_blob)?;
|
||||
|
||||
let mut chunk_reader = RemoteChunkReader::new(reader.clone(), None, HashMap::new());
|
||||
|
||||
for item in manifest.files() {
|
||||
let mut path = tgt_store.base_path();
|
||||
path.push(snapshot.relative_path());
|
||||
@@ -266,6 +264,8 @@ async fn pull_snapshot(
|
||||
}
|
||||
}
|
||||
|
||||
let mut chunk_reader = RemoteChunkReader::new(reader.clone(), None, item.chunk_crypt_mode(), HashMap::new());
|
||||
|
||||
pull_single_archive(
|
||||
worker,
|
||||
&reader,
|
||||
|
||||
Reference in new issue
Block a user