fix a config sync bug
This commit is contained in:
		
							parent
							
								
									89035b5223
								
							
						
					
					
						commit
						953d2e6e09
					
				| @ -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; | ||||
|                                 } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user