mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 22:12:53 +01:00
fix(scoop): detect shims correctly w/ sysinfo 0.30
This commit is a fix that handles a subtle breaking change in sysinfo::Process:root() which no longer can be used to see if a process is a scoop shim. Instead we can stringify the executable path and see if the absolute exe path contains the substring "shims". With this fix duplicate process detection is once again working correctly.
This commit is contained in:
@@ -482,8 +482,8 @@ fn main() -> Result<()> {
|
||||
if matched_procs.len() > 1 {
|
||||
let mut len = matched_procs.len();
|
||||
for proc in matched_procs {
|
||||
if let Some(root) = proc.root() {
|
||||
if root.ends_with("shims") {
|
||||
if let Some(executable_path) = proc.exe() {
|
||||
if executable_path.to_string_lossy().contains("shims") {
|
||||
len -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user