mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-16 07:16:38 +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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user