use different default config for bsds
This commit is contained in:
parent
e64c1eda93
commit
eb1cfb6ead
1 changed files with 6 additions and 5 deletions
11
src/main.rs
11
src/main.rs
|
@ -32,11 +32,12 @@ struct Args {
|
|||
}
|
||||
|
||||
fn get_config_default() -> &'static str {
|
||||
if cfg!(windows) {
|
||||
"C:\\ProgramData\\refractr\\config.toml"
|
||||
} else {
|
||||
"/etc/refractr/config.toml"
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
return "C:\\ProgramData\\refractr\\config.toml";
|
||||
#[cfg(target_os = "linux")]
|
||||
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> {
|
||||
|
|
Loading…
Add table
Reference in a new issue