sync option share rdp
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
5f222c4df2
commit
5d0384f580
@ -147,11 +147,23 @@ fn handle_config_options(config_options: HashMap<String, String>) {
|
|||||||
config_options
|
config_options
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(k, v)| {
|
.map(|(k, v)| {
|
||||||
|
if k == "allow-share-rdp" {
|
||||||
|
// 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 {
|
||||||
if v.is_empty() {
|
if v.is_empty() {
|
||||||
options.remove(k);
|
options.remove(k);
|
||||||
} else {
|
} else {
|
||||||
options.insert(k.to_string(), v.to_string());
|
options.insert(k.to_string(), v.to_string());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.count();
|
.count();
|
||||||
Config::set_options(options);
|
Config::set_options(options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user