diff --git a/src/server.rs b/src/server.rs index 2b833576a..de8fd2e7f 100644 --- a/src/server.rs +++ b/src/server.rs @@ -487,15 +487,17 @@ async fn sync_and_watch_config_dir() { Data::SyncConfig(Some(configs)) => { let (config, config2) = *configs; let _chk = crate::ipc::CheckIfRestart::new(); - if cfg0.0 != config { - cfg0.0 = config.clone(); - Config::set(config); - log::info!("sync config from root"); - } - if cfg0.1 != config2 { - cfg0.1 = config2.clone(); - Config2::set(config2); - log::info!("sync config2 from root"); + if !config.is_empty() { + if cfg0.0 != config { + cfg0.0 = config.clone(); + Config::set(config); + log::info!("sync config from root"); + } + if cfg0.1 != config2 { + cfg0.1 = config2.clone(); + Config2::set(config2); + log::info!("sync config2 from root"); + } } synced = true; }