fix: cross-platform compatibility for Windows support
- Use directories::BaseDirs for config path fallback instead of hardcoded Unix path - Default to notepad on Windows instead of vi for editor commands - Skip +N line argument for notepad in todo edit (notepad doesn't support it)
This commit is contained in:
parent
b8a73bfb3e
commit
822d9194ae
4 changed files with 29 additions and 9 deletions
|
|
@ -37,8 +37,10 @@ impl Settings {
|
|||
fn config_path() -> PathBuf {
|
||||
if let Some(proj_dirs) = ProjectDirs::from("", "", "streamd") {
|
||||
proj_dirs.config_dir().join("config.toml")
|
||||
} else if let Some(base_dirs) = directories::BaseDirs::new() {
|
||||
base_dirs.config_dir().join("streamd").join("config.toml")
|
||||
} else {
|
||||
PathBuf::from("~/.config/streamd/config.toml")
|
||||
PathBuf::from("streamd_config.toml")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue