diff --git a/process/tags/appimage_unix.go b/process/tags/appimage_unix.go index b2f47750..891d9be9 100644 --- a/process/tags/appimage_unix.go +++ b/process/tags/appimage_unix.go @@ -8,9 +8,9 @@ import ( "strings" "github.com/safing/portbase/log" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/process" "github.com/safing/portmaster/profile" + "github.com/safing/portmaster/profile/icons" ) func init() { @@ -124,7 +124,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile { if tag, ok := p.GetTag(appImagePathTagKey); ok { return profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: osdetail.GenerateBinaryNameFromPath(p.Path), + Name: icons.GenerateBinaryNameFromPath(p.Path), PresentationPath: p.Path, UsePresentationPath: true, Fingerprints: []profile.Fingerprint{ @@ -141,7 +141,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile { if tag, ok := p.GetTag(appImageMountIDTagKey); ok { return profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: osdetail.GenerateBinaryNameFromPath(p.Path), + Name: icons.GenerateBinaryNameFromPath(p.Path), PresentationPath: p.Path, UsePresentationPath: true, Fingerprints: []profile.Fingerprint{ diff --git a/process/tags/flatpak_unix.go b/process/tags/flatpak_unix.go index 1c5bf656..a3dc5276 100644 --- a/process/tags/flatpak_unix.go +++ b/process/tags/flatpak_unix.go @@ -3,9 +3,9 @@ package tags import ( "strings" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/process" "github.com/safing/portmaster/profile" + "github.com/safing/portmaster/profile/icons" ) func init() { @@ -69,7 +69,7 @@ func (h *flatpakHandler) CreateProfile(p *process.Process) *profile.Profile { if tag, ok := p.GetTag(flatpakIDTagKey); ok { return profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: osdetail.GenerateBinaryNameFromPath(p.Path), + Name: icons.GenerateBinaryNameFromPath(p.Path), PresentationPath: p.Path, UsePresentationPath: true, Fingerprints: []profile.Fingerprint{ diff --git a/process/tags/interpreter_unix.go b/process/tags/interpreter_unix.go index a5ba2c18..ffa88d5a 100644 --- a/process/tags/interpreter_unix.go +++ b/process/tags/interpreter_unix.go @@ -12,9 +12,9 @@ import ( "github.com/google/shlex" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/process" "github.com/safing/portmaster/profile" + "github.com/safing/portmaster/profile/icons" ) func init() { @@ -161,7 +161,7 @@ func (h *InterpHandler) CreateProfile(p *process.Process) *profile.Profile { for _, ext := range it.Extensions { scriptName, _ = strings.CutSuffix(scriptName, ext) } - scriptName = osdetail.GenerateBinaryNameFromPath(scriptName) + scriptName = icons.GenerateBinaryNameFromPath(scriptName) return profile.New(&profile.Profile{ Source: profile.SourceLocal, diff --git a/process/tags/snap_unix.go b/process/tags/snap_unix.go index e7f60479..6099182b 100644 --- a/process/tags/snap_unix.go +++ b/process/tags/snap_unix.go @@ -3,9 +3,9 @@ package tags import ( "strings" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/process" "github.com/safing/portmaster/profile" + "github.com/safing/portmaster/profile/icons" ) func init() { @@ -117,7 +117,7 @@ func (h *SnapHandler) CreateProfile(p *process.Process) *profile.Profile { return profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: osdetail.GenerateBinaryNameFromPath(tag.Value), + Name: icons.GenerateBinaryNameFromPath(tag.Value), PresentationPath: p.Path, UsePresentationPath: hasVersion, Fingerprints: []profile.Fingerprint{ diff --git a/process/tags/svchost_windows.go b/process/tags/svchost_windows.go index ca3f2067..b7cf0a0e 100644 --- a/process/tags/svchost_windows.go +++ b/process/tags/svchost_windows.go @@ -36,7 +36,7 @@ func (h *SVCHostTagHandler) Name() string { // of this handler. func (h *SVCHostTagHandler) TagDescriptions() []process.TagDescription { return []process.TagDescription{ - process.TagDescription{ + { ID: svchostTagKey, Name: "SvcHost Service Name", Description: "Name of a service running in svchost.exe as reported by Windows.", @@ -86,10 +86,10 @@ func (h *SVCHostTagHandler) CreateProfile(p *process.Process) *profile.Profile { // Create new profile based on tag. newProfile := profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: "Windows Service: " + osdetail.GenerateBinaryNameFromPath(tag.Value), + Name: "Windows Service: " + icons.GenerateBinaryNameFromPath(tag.Value), UsePresentationPath: false, Fingerprints: []profile.Fingerprint{ - profile.Fingerprint{ + { Type: profile.FingerprintTypeTagID, Key: tag.Key, Operation: profile.FingerprintOperationEqualsID, diff --git a/process/tags/winstore_windows.go b/process/tags/winstore_windows.go index 1b55d23a..d679b15d 100644 --- a/process/tags/winstore_windows.go +++ b/process/tags/winstore_windows.go @@ -6,9 +6,9 @@ import ( "github.com/safing/portbase/log" "github.com/safing/portbase/utils" - "github.com/safing/portbase/utils/osdetail" "github.com/safing/portmaster/process" "github.com/safing/portmaster/profile" + "github.com/safing/portmaster/profile/icons" ) func init() { @@ -101,7 +101,7 @@ func (h *WinStoreHandler) CreateProfile(p *process.Process) *profile.Profile { if tag, ok := p.GetTag(winStoreAppNameTagKey); ok { return profile.New(&profile.Profile{ Source: profile.SourceLocal, - Name: osdetail.GenerateBinaryNameFromPath(tag.Value), + Name: icons.GenerateBinaryNameFromPath(tag.Value), PresentationPath: p.Path, UsePresentationPath: true, Fingerprints: []profile.Fingerprint{