mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
Remove the need for a directory for db export
Plus on import use the context directory. We can actually write there just fine.
This commit is contained in:
@@ -489,11 +489,11 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
.await?;
|
||||
}
|
||||
"send-backup" => {
|
||||
let tdir = tempfile::TempDir::new()?;
|
||||
let dir = tdir.path();
|
||||
let provider = BackupProvider::prepare(&context, dir).await?;
|
||||
let provider = BackupProvider::prepare(&context).await?;
|
||||
let qr = provider.qr();
|
||||
let rendered = deltachat::qr_code_generator::generate_backup_qr(&context, &qr).await?;
|
||||
let tdir = tempfile::TempDir::new()?;
|
||||
let dir = tdir.path();
|
||||
let file = dir.join("qr.svg");
|
||||
tokio::fs::write(&file, rendered).await?;
|
||||
println!("The QR code is at: {}", file.display());
|
||||
|
||||
Reference in New Issue
Block a user