Compare commits

...

1 Commits

Author SHA1 Message Date
link2xt
a76386e528 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.
2022-08-14 20:26:07 +00:00

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?;