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:
@@ -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(),
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user