mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 10:56:29 +03:00
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:
@@ -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?;
|
||||
|
||||
Reference in New Issue
Block a user