backup_info: BackupDir shortcut

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller
2019-03-05 09:16:54 +01:00
parent 93b49ce38a
commit 391d310741
4 changed files with 22 additions and 9 deletions

View File

@ -111,7 +111,7 @@ fn list_backups(
let btype = item["backup-type"].as_str().unwrap();
let epoch = item["backup-time"].as_i64().unwrap();
let backup_dir = BackupDir::new(BackupGroup::new(btype, id), epoch);
let backup_dir = BackupDir::new(btype, id, epoch);
let files = item["files"].as_array().unwrap().iter().map(|v| v.as_str().unwrap().to_owned()).collect();
@ -203,7 +203,7 @@ fn list_snapshots(
let btype = item["backup-type"].as_str().unwrap();
let epoch = item["backup-time"].as_i64().unwrap();
let snapshot = BackupDir::new(BackupGroup::new(btype, id), epoch);
let snapshot = BackupDir::new(btype, id, epoch);
let path = snapshot.relative_path().to_str().unwrap().to_owned();