Merge pull request #6018 from 21pages/sync_share_rdp
sync option share rdp
This commit is contained in:
		
						commit
						b39ba92cfe
					
				| @ -147,10 +147,22 @@ fn handle_config_options(config_options: HashMap<String, String>) { | |||||||
|     config_options |     config_options | ||||||
|         .iter() |         .iter() | ||||||
|         .map(|(k, v)| { |         .map(|(k, v)| { | ||||||
|             if v.is_empty() { |             if k == "allow-share-rdp" { | ||||||
|                 options.remove(k); |                 // only changes made after installation take effect.
 | ||||||
|  |                 #[cfg(windows)] | ||||||
|  |                 if crate::ui_interface::is_rdp_service_open() { | ||||||
|  |                     let current = crate::ui_interface::is_share_rdp(); | ||||||
|  |                     let set = v == "Y"; | ||||||
|  |                     if current != set { | ||||||
|  |                         crate::platform::windows::set_share_rdp(set); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             } else { |             } else { | ||||||
|                 options.insert(k.to_string(), v.to_string()); |                 if v.is_empty() { | ||||||
|  |                     options.remove(k); | ||||||
|  |                 } else { | ||||||
|  |                     options.insert(k.to_string(), v.to_string()); | ||||||
|  |                 } | ||||||
|             } |             } | ||||||
|         }) |         }) | ||||||
|         .count(); |         .count(); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user