diff --git a/src/config.rs b/src/config.rs index 212f011..1802e84 100644 --- a/src/config.rs +++ b/src/config.rs @@ -80,13 +80,14 @@ impl Settings { } else if let Ok(env_config) = std::env::var("KEEP_CONFIG") { PathBuf::from(env_config) } else { - let default_path = dirs::config_dir() - .map(|mut path| { - path.push("keep"); - path.push("config.yml"); - path - }) - .unwrap_or_else(|| PathBuf::from("~/.config/keep/config.yml")); + let default_path = if let Some(mut config_dir) = home::home_dir() { + config_dir.push(".config"); + config_dir.push("keep"); + config_dir.push("config.yml"); + config_dir + } else { + PathBuf::from("~/.config/keep/config.yml") + }; debug!("CONFIG: Using default config path: {:?}", default_path); default_path };