mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-09-19 10:51:01 +03:00
fix(deploy): don't wipe local id when --deploy gets an empty --id (#15633)
`rustdesk --deploy --id ""` (e.g. an unset variable in a deployment script) deploys a blank id, then wipes the local id and unconfirms the key through the IPC config write. The Android deploy flow already guards an empty id (#15146); apply the same guard to the CLI, and reject an empty id at the IPC write boundary the same way the read path was fixed in #15626.
This commit is contained in:
@@ -667,7 +667,8 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
None
|
||||
}
|
||||
};
|
||||
let new_id = get_value("--id");
|
||||
// An empty --id (e.g. an unset var) would deploy a blank id; the Android flow guards this too (#15146).
|
||||
let new_id = get_value("--id").filter(|s| !s.is_empty());
|
||||
match crate::ui_interface::deploy_device(token, new_id) {
|
||||
crate::ui_interface::DeployResult::Ok => {
|
||||
println!("Device deployed.");
|
||||
|
||||
Reference in New Issue
Block a user