File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -147,10 +147,22 @@ fn handle_config_options(config_options: HashMap<String, String>) {
147
147
config_options
148
148
. iter ( )
149
149
. map ( |( k, v) | {
150
- if v. is_empty ( ) {
151
- options. remove ( k) ;
150
+ if k == "allow-share-rdp" {
151
+ // only changes made after installation take effect.
152
+ #[ cfg( windows) ]
153
+ if crate :: ui_interface:: is_rdp_service_open ( ) {
154
+ let current = crate :: ui_interface:: is_share_rdp ( ) ;
155
+ let set = v == "Y" ;
156
+ if current != set {
157
+ crate :: platform:: windows:: set_share_rdp ( set) ;
158
+ }
159
+ }
152
160
} else {
153
- options. insert ( k. to_string ( ) , v. to_string ( ) ) ;
161
+ if v. is_empty ( ) {
162
+ options. remove ( k) ;
163
+ } else {
164
+ options. insert ( k. to_string ( ) , v. to_string ( ) ) ;
165
+ }
154
166
}
155
167
} )
156
168
. count ( ) ;
You can’t perform that action at this time.
0 commit comments