Fix: stop checking config paths after finding a config file

This commit is contained in:
Neshura 2024-04-08 22:18:51 +02:00
parent bd7942430c
commit 38cfbdcfb8
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -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);