mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-06 16:14:11 +00:00
default config relative path only required if $PWD doesnt exist
This commit is contained in:
+6
-6
@@ -14,12 +14,12 @@ pub fn get_default_config_path() -> Option<PathBuf> {
|
||||
if path.exists() {
|
||||
return Some(path);
|
||||
}
|
||||
}
|
||||
|
||||
// config.json in the current working directory (relative path)
|
||||
let relative_path = PathBuf::from("config.json");
|
||||
if relative_path.exists() {
|
||||
return Some(relative_path);
|
||||
} else {
|
||||
// config.json in the current working directory (relative path)
|
||||
let relative_path = PathBuf::from("config.json");
|
||||
if relative_path.exists() {
|
||||
return Some(relative_path);
|
||||
}
|
||||
}
|
||||
|
||||
// System standard directories
|
||||
|
||||
Reference in New Issue
Block a user