diff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.lock index 04b5fae..f5d2715 100644 --- a/desktop/src-tauri/Cargo.lock +++ b/desktop/src-tauri/Cargo.lock @@ -1867,7 +1867,7 @@ dependencies = [ [[package]] name = "librqbit" -version = "5.0.0-beta.1" +version = "5.0.0" dependencies = [ "anyhow", "axum", @@ -1933,7 +1933,7 @@ version = "2.2.1" [[package]] name = "librqbit-core" -version = "3.3.0" +version = "3.4.0" dependencies = [ "anyhow", "directories", @@ -1953,7 +1953,7 @@ dependencies = [ [[package]] name = "librqbit-dht" -version = "5.0.0-beta.1" +version = "5.0.0" dependencies = [ "anyhow", "backoff", @@ -1978,7 +1978,7 @@ dependencies = [ [[package]] name = "librqbit-peer-protocol" -version = "3.3.0" +version = "3.4.0" dependencies = [ "anyhow", "bincode", diff --git a/desktop/src-tauri/src/main.rs b/desktop/src-tauri/src/main.rs index 24e106e..cb9dc79 100644 --- a/desktop/src-tauri/src/main.rs +++ b/desktop/src-tauri/src/main.rs @@ -6,6 +6,7 @@ mod config; use std::{ fs::{File, OpenOptions}, io::{BufReader, BufWriter}, + path::Path, sync::Arc, }; @@ -49,6 +50,8 @@ fn read_config(path: &str) -> anyhow::Result { } fn write_config(path: &str, config: &RqbitDesktopConfig) -> anyhow::Result<()> { + std::fs::create_dir_all(Path::new(path).parent().context("no parent")?) + .context("error creating dirs")?; let tmp = format!("{}.tmp", path); let mut tmp_file = BufWriter::new( OpenOptions::new()