mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-22 18:26:41 +00:00
Fix IsAnotherProcessRunning (#4858)
Compare the exact process name rather than searching for a substring of the full path
This commit is contained in:
@@ -28,7 +28,8 @@ func IsAnotherProcessRunning() (int32, bool, error) {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.Contains(strings.ToLower(runningProcessPath), processName) && isProcessOwnedByCurrentUser(p) {
|
runningProcessName := strings.ToLower(filepath.Base(runningProcessPath))
|
||||||
|
if runningProcessName == processName && isProcessOwnedByCurrentUser(p) {
|
||||||
return p.Pid, true, nil
|
return p.Pid, true, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user