Fix download directory

This commit is contained in:
2025-07-20 00:03:09 -07:00
parent 2e2cb9b563
commit 7945deb4aa

View File

@@ -17,8 +17,8 @@ async fn download(app: AppHandle, url: String, name: String) -> Result<(), Strin
let mut downloaded: u64 = 0; let mut downloaded: u64 = 0;
let mut stream = resp.bytes_stream(); let mut stream = resp.bytes_stream();
println!("{}", app.path().data_dir().unwrap().display().to_string()); println!("{}", app.path().app_local_data_dir().unwrap().display().to_string());
let mut file = tokio::fs::File::create(app.path().data_dir().unwrap().join(format!("download_{}.zip", name))) let mut file = tokio::fs::File::create(app.path().app_local_data_dir().unwrap().join(format!("download_{}.zip", name)))
.await .await
.map_err(|e| e.to_string())?; .map_err(|e| e.to_string())?;