add encrypted info to Manifest

we want to save if a file of a backup is encrypted, so that we can
* show that info on the gui
* can later decide if we need to decrypt the backup

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2020-06-18 13:55:23 +02:00
committed by Dietmar Maurer
parent 16021f6ab7
commit e181d2f6da
4 changed files with 28 additions and 12 deletions

View File

@ -57,12 +57,14 @@ fn read_backup_index(store: &DataStore, backup_dir: &BackupDir) -> Result<Vec<Ba
for item in manifest.files() {
result.push(BackupContent {
filename: item.filename.clone(),
encrypted: item.encrypted,
size: Some(item.size),
});
}
result.push(BackupContent {
filename: MANIFEST_BLOB_NAME.to_string(),
encrypted: Some(false),
size: Some(index_size),
});
@ -213,7 +215,7 @@ pub fn list_snapshot_files(
for file in info.files {
if file_set.contains(&file) { continue; }
files.push(BackupContent { filename: file, size: None });
files.push(BackupContent { filename: file, size: None, encrypted: None });
}
Ok(files)