[service] Fix UI path detection

This commit is contained in:
Vladimir Stoilov 2025-04-01 14:33:15 +03:00
parent 90ce30e842
commit c1c3197574
No known key found for this signature in database
GPG key ID: 1E926777A440203A
2 changed files with 8 additions and 2 deletions
service
process
profile

View file

@ -2,6 +2,7 @@ package process
import (
"errors"
"runtime"
"sync/atomic"
"github.com/safing/portmaster/base/log"
@ -21,7 +22,12 @@ func (pm *ProcessModule) Manager() *mgr.Manager {
}
func (pm *ProcessModule) Start() error {
file, err := pm.instance.BinaryUpdates().GetFile("portmaster")
identifier := "portmaster"
if runtime.GOOS == "windows" {
identifier += ".exe"
}
file, err := pm.instance.BinaryUpdates().GetFile(identifier)
if err != nil {
log.Errorf("process: failed to get path of ui: %s", err)
} else {

View file

@ -72,7 +72,7 @@ type Profile struct { //nolint:maligned // not worth the effort
// Icons holds a list of icons to represent the application.
Icons []binmeta.Icon
// Deprecated: LinkedPath used to point to the executableis this
// Deprecated: LinkedPath used to point to the executables this
// profile was created for.
// Until removed, it will be added to the Fingerprints as an exact path match.
LinkedPath string // constant