fix mac compile
This commit is contained in:
parent
b74a01a3b3
commit
2851d71290
@ -258,10 +258,10 @@ pub fn check_main_window() {
|
|||||||
let app = format!("/Applications/{}.app", crate::get_app_name());
|
let app = format!("/Applications/{}.app", crate::get_app_name());
|
||||||
let my_uid = sys
|
let my_uid = sys
|
||||||
.process((std::process::id() as i32).into())
|
.process((std::process::id() as i32).into())
|
||||||
.map(|x| x.uid)
|
.map(|x| x.user_id())
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
for (_, p) in sys.processes().iter() {
|
for (_, p) in sys.processes().iter() {
|
||||||
if p.cmd().len() == 1 && p.uid == my_uid && p.cmd()[0].contains(&app) {
|
if p.cmd().len() == 1 && p.user_id() == my_uid && p.cmd()[0].contains(&app) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user