imex: make it possible to cancel backup export

Previously shall_stop_ongoing() was never used
in backup export, so cancelling backup export
did not actually stop the process.
This commit is contained in:
link2xt
2022-08-14 20:26:07 +00:00
parent 8b2ece63ab
commit a76386e528

View File

@@ -614,6 +614,11 @@ async fn export_backup_inner(
);
continue;
}
if context.shall_stop_ongoing().await {
bail!("Backup export cancelled");
}
let mut file = File::open(entry.path()).await?;
let path_in_archive = PathBuf::from(BLOBS_BACKUP_NAME).join(name);
builder.append_file(path_in_archive, &mut file).await?;