feat: conventional default download and share folders

The default download directory is now the platform Downloads folder plus
a Soulseek subfolder (via the directories crate — XDG on Linux, known
folder on Windows) instead of a tilde path that only worked with a HOME
variable. Sharing follows the Soulseek convention of sharing what you
download: shared_dir defaults to the download folder, and an explicitly
empty shared_dir opts out. The folder is created at startup so first-run
share validation succeeds.
This commit is contained in:
michel
2026-07-20 20:43:27 +02:00
parent 8221045aa0
commit 8389d525e7
4 changed files with 86 additions and 8 deletions
+10
View File
@@ -172,6 +172,16 @@ fn run_default_tui(
let (server_host, server_port) = parse_server_address(&resolved.server)?;
// Make sure the download folder exists up front: first-run defaults point
// download and shared at the same fresh Downloads/Soulseek folder, and
// shared-directory validation requires an existing path.
if let Err(e) = std::fs::create_dir_all(&resolved.download_dir) {
eprintln!(
"⚠️ Could not create download directory {}: {e}",
resolved.download_dir
);
}
let shared_directory = match directories::resolve_shared_directory(
resolved.shared_dir.as_deref(),
) {