src/api2/backup.rs: use block_in_place for remove_backup

This commit is contained in:
Dietmar Maurer 2020-10-01 11:11:14 +02:00
parent 124b93f31c
commit 9070d11f4c

View File

@ -200,7 +200,7 @@ async move {
};
if benchmark {
env.log("benchmark finished successfully");
env.remove_backup()?;
tools::runtime::block_in_place(|| env.remove_backup())?;
return Ok(());
}
match (res, env.ensure_finished()) {
@ -222,7 +222,7 @@ async move {
(Err(err), Err(_)) => {
env.log(format!("backup failed: {}", err));
env.log("removing failed backup");
env.remove_backup()?;
tools::runtime::block_in_place(|| env.remove_backup())?;
Err(err)
},
}