src/backup/backup_info.rs: move code into separate file

Also changed create_backup_dir() parameters - uses &BackupDir now.
This commit is contained in:
Dietmar Maurer
2019-03-05 07:18:12 +01:00
parent 2b01a22507
commit b3483782d1
4 changed files with 191 additions and 199 deletions

View File

@ -80,9 +80,9 @@ fn upload_catar(
verify_chunk_size(chunk_size)?;
let datastore = DataStore::lookup_datastore(store)?;
let backup_dir = BackupDir::new(BackupGroup::new(backup_type, backup_id), backup_time);
let (mut path, _new) = datastore.create_backup_dir(
backup_type, backup_id, Local.timestamp(backup_time, 0))?;
let (mut path, _new) = datastore.create_backup_dir(&backup_dir)?;
path.push(archive_name);