From 886fb73521fe6a5d8f7e1d89d74e44ce6e0127a5 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Sat, 12 Aug 2023 15:07:08 +0800 Subject: [PATCH] Some time it is RustDesk, sometimes it is rustdesk on mac, so make it case insensitive --- src/common.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.rs b/src/common.rs index cadf7330d..011ca0524 100644 --- a/src/common.rs +++ b/src/common.rs @@ -1112,6 +1112,7 @@ pub fn check_process(arg: &str, same_uid: bool) -> bool { if let Ok(linked) = path.read_link() { path = linked; } + let path = path.to_string_lossy().to_lowercase(); let my_uid = sys .process((std::process::id() as usize).into()) .map(|x| x.user_id()) @@ -1121,7 +1122,7 @@ pub fn check_process(arg: &str, same_uid: bool) -> bool { if let Ok(linked) = cur_path.read_link() { cur_path = linked; } - if cur_path != path { + if cur_path.to_string_lossy().to_lowercase() != path { continue; } if p.pid().to_string() == std::process::id().to_string() {