From fbb798f6d2cb68cddcc865e3fc93f4cab7d411e6 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Mon, 13 May 2019 07:06:56 +0200 Subject: [PATCH] src/api2/admin/datastore/backup.rs: ignore errors from last_backup --- src/api2/admin/datastore/backup.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api2/admin/datastore/backup.rs b/src/api2/admin/datastore/backup.rs index 3d92804d..499af695 100644 --- a/src/api2/admin/datastore/backup.rs +++ b/src/api2/admin/datastore/backup.rs @@ -75,7 +75,7 @@ fn upgrade_to_backup_protocol( let env_type = rpcenv.env_type(); let backup_group = BackupGroup::new(backup_type, backup_id); - let last_backup = BackupInfo::last_backup(&datastore.base_path(), &backup_group)?; + let last_backup = BackupInfo::last_backup(&datastore.base_path(), &backup_group).unwrap_or(None); let backup_dir = BackupDir::new_with_group(backup_group, backup_time.timestamp()); let (_path, is_new) = datastore.create_backup_dir(&backup_dir)?;