Skip to content

Commit

Permalink
Workaround default download dir #175
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Aug 12, 2024
1 parent bf1a230 commit 3269ee4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions desktop/src-tauri/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ pub struct RqbitDesktopConfig {

impl Default for RqbitDesktopConfig {
fn default() -> Self {
let download_folder = directories::UserDirs::new()
.expect("directories::UserDirs::new()")
let userdirs = directories::UserDirs::new().expect("directories::UserDirs::new()");
let download_folder = userdirs
.download_dir()
.expect("download_dir()")
.to_path_buf();
.map(|d| d.to_owned())
.unwrap_or_else(|| userdirs.home_dir().join("Downloads"));

Self {
default_download_location: download_folder,
Expand Down

0 comments on commit 3269ee4

Please sign in to comment.