fix: emit progress 0 if get_backup() fails

This commit is contained in:
link2xt
2024-10-05 15:37:11 +00:00
parent a592a470cf
commit 2cb8b53256

View File

@@ -353,6 +353,9 @@ pub async fn get_backup(context: &Context, qr: Qr) -> Result<()> {
Err(format_err!("Backup reception cancelled"))
})
.await;
if res.is_err() {
context.emit_event(EventType::ImexProgress(0));
}
context.free_ongoing().await;
res?;
}