mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
Do not save svg to file, just print qr text
This commit is contained in:
@@ -12,7 +12,6 @@ log = "0.4.16"
|
||||
pretty_env_logger = "0.4"
|
||||
rusqlite = "0.27"
|
||||
rustyline = "10"
|
||||
tempfile = "3"
|
||||
tokio = { version = "1", features = ["fs", "rt-multi-thread", "macros"] }
|
||||
|
||||
[features]
|
||||
|
||||
@@ -491,12 +491,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
|
||||
"send-backup" => {
|
||||
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());
|
||||
println!("QR code: {}", format_backup(&qr)?);
|
||||
provider.join().await?;
|
||||
}
|
||||
"receive-backup" => {
|
||||
|
||||
Reference in New Issue
Block a user