BackupDir: make constructor fallible
since converting from i64 epoch timestamp to DateTime is not always possible. previously, passing invalid backup-time from client to server (or vice-versa) panicked the corresponding tokio task. now we get proper error messages including the invalid timestamp. Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
committed by
Dietmar Maurer
parent
7158b304f5
commit
e0e5b4426a
@ -83,7 +83,7 @@ fn upgrade_to_backup_reader_protocol(
|
||||
|
||||
let env_type = rpcenv.env_type();
|
||||
|
||||
let backup_dir = BackupDir::new(backup_type, backup_id, backup_time);
|
||||
let backup_dir = BackupDir::new(backup_type, backup_id, backup_time)?;
|
||||
let path = datastore.base_path();
|
||||
|
||||
//let files = BackupInfo::list_files(&path, &backup_dir)?;
|
||||
|
Reference in New Issue
Block a user