use different default config for bsds

This commit is contained in:
Bryson Steck 2025-03-15 17:43:22 -06:00
parent e64c1eda93
commit eb1cfb6ead
Signed by: bryson
SSH key fingerprint: SHA256:XpKABw/nP4z8UVaH+weLaBnEOD86+cVwif+QjuYLGT4

View file

@ -32,11 +32,12 @@ struct Args {
} }
fn get_config_default() -> &'static str { fn get_config_default() -> &'static str {
if cfg!(windows) { #[cfg(target_os = "windows")]
"C:\\ProgramData\\refractr\\config.toml" return "C:\\ProgramData\\refractr\\config.toml";
} else { #[cfg(target_os = "linux")]
"/etc/refractr/config.toml" return "/etc/refractr/config.toml";
} #[cfg(any(target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))]
return "/usr/local/etc/refractr/config.toml";
} }
fn main() -> Result<(), String> { fn main() -> Result<(), String> {