[service] Fix UI path detection
This commit is contained in:
@@ -2,6 +2,7 @@ package process
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"runtime"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
"github.com/safing/portmaster/base/log"
|
"github.com/safing/portmaster/base/log"
|
||||||
@@ -21,7 +22,12 @@ func (pm *ProcessModule) Manager() *mgr.Manager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pm *ProcessModule) Start() error {
|
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 {
|
if err != nil {
|
||||||
log.Errorf("process: failed to get path of ui: %s", err)
|
log.Errorf("process: failed to get path of ui: %s", err)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ type Profile struct { //nolint:maligned // not worth the effort
|
|||||||
// Icons holds a list of icons to represent the application.
|
// Icons holds a list of icons to represent the application.
|
||||||
Icons []binmeta.Icon
|
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.
|
// profile was created for.
|
||||||
// Until removed, it will be added to the Fingerprints as an exact path match.
|
// Until removed, it will be added to the Fingerprints as an exact path match.
|
||||||
LinkedPath string // constant
|
LinkedPath string // constant
|
||||||
|
|||||||
Reference in New Issue
Block a user