fix check_process for empty arg since on mac, p.cmd() get "/Applications/RustDesk.app/Contents/MacOS/RustDesk", "XPC_SERVICE_NAME=com.carriez.RustDesk_server"
This commit is contained in:
parent
07ab8e508c
commit
178d33155f
1 changed files with 6 additions and 1 deletions
|
|
@ -1274,8 +1274,13 @@ pub fn check_process(arg: &str, mut same_uid: bool) -> bool {
|
|||
if same_uid && p.user_id() != my_uid {
|
||||
continue;
|
||||
}
|
||||
// on mac, p.cmd() get "/Applications/RustDesk.app/Contents/MacOS/RustDesk", "XPC_SERVICE_NAME=com.carriez.RustDesk_server"
|
||||
let parg = if p.cmd().len() <= 1 { "" } else { &p.cmd()[1] };
|
||||
if arg == parg {
|
||||
if arg.is_empty() {
|
||||
if !parg.starts_with("--") {
|
||||
return true;
|
||||
}
|
||||
} else if arg == parg {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue