Fix: stop checking config paths after finding a config file
This commit is contained in:
parent
bd7942430c
commit
38cfbdcfb8
1 changed files with 4 additions and 2 deletions
|
@ -132,8 +132,10 @@ impl Config {
|
|||
let mut system_path= system_config_paths[1];
|
||||
|
||||
for path in system_config_paths {
|
||||
if path.exists() {
|
||||
let cfg_path = path.join("config.toml");
|
||||
if cfg_path.exists() {
|
||||
system_path = path;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -159,7 +161,7 @@ async fn main() -> std::io::Result<()> {
|
|||
log::set_max_level(LevelFilter::Info);
|
||||
|
||||
let config = Config::load().expect("Error while loading or generating the config");
|
||||
|
||||
|
||||
let loaded_redirects_msg = format!("Loaded {} redirects from user config", config.user.domain_configs.len());
|
||||
info!(loaded_redirects_msg);
|
||||
|
||||
|
|
Loading…
Reference in a new issue