Rename profile/icons to profile/binmeta
This commit is contained in:
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -124,7 +124,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
if tag, ok := p.GetTag(appImagePathTagKey); ok {
|
if tag, ok := p.GetTag(appImagePathTagKey); ok {
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: icons.GenerateBinaryNameFromPath(p.Path),
|
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
|
||||||
PresentationPath: p.Path,
|
PresentationPath: p.Path,
|
||||||
UsePresentationPath: true,
|
UsePresentationPath: true,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
@@ -141,7 +141,7 @@ func (h *AppImageHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
if tag, ok := p.GetTag(appImageMountIDTagKey); ok {
|
if tag, ok := p.GetTag(appImageMountIDTagKey); ok {
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: icons.GenerateBinaryNameFromPath(p.Path),
|
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
|
||||||
PresentationPath: p.Path,
|
PresentationPath: p.Path,
|
||||||
UsePresentationPath: true,
|
UsePresentationPath: true,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -69,7 +69,7 @@ func (h *flatpakHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
if tag, ok := p.GetTag(flatpakIDTagKey); ok {
|
if tag, ok := p.GetTag(flatpakIDTagKey); ok {
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: icons.GenerateBinaryNameFromPath(p.Path),
|
Name: binmeta.GenerateBinaryNameFromPath(p.Path),
|
||||||
PresentationPath: p.Path,
|
PresentationPath: p.Path,
|
||||||
UsePresentationPath: true,
|
UsePresentationPath: true,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -161,7 +161,7 @@ func (h *InterpHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
for _, ext := range it.Extensions {
|
for _, ext := range it.Extensions {
|
||||||
scriptName, _ = strings.CutSuffix(scriptName, ext)
|
scriptName, _ = strings.CutSuffix(scriptName, ext)
|
||||||
}
|
}
|
||||||
scriptName = icons.GenerateBinaryNameFromPath(scriptName)
|
scriptName = binmeta.GenerateBinaryNameFromPath(scriptName)
|
||||||
|
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -117,7 +117,7 @@ func (h *SnapHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
|
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: icons.GenerateBinaryNameFromPath(tag.Value),
|
Name: binmeta.GenerateBinaryNameFromPath(tag.Value),
|
||||||
PresentationPath: p.Path,
|
PresentationPath: p.Path,
|
||||||
UsePresentationPath: hasVersion,
|
UsePresentationPath: hasVersion,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"github.com/safing/portbase/utils/osdetail"
|
"github.com/safing/portbase/utils/osdetail"
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -86,7 +86,7 @@ func (h *SVCHostTagHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
// Create new profile based on tag.
|
// Create new profile based on tag.
|
||||||
newProfile := profile.New(&profile.Profile{
|
newProfile := profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: "Windows Service: " + icons.GenerateBinaryNameFromPath(tag.Value),
|
Name: "Windows Service: " + binmeta.GenerateBinaryNameFromPath(tag.Value),
|
||||||
UsePresentationPath: false,
|
UsePresentationPath: false,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
{
|
{
|
||||||
@@ -99,9 +99,9 @@ func (h *SVCHostTagHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Load default icon for windows service.
|
// Load default icon for windows service.
|
||||||
icon, err := icons.LoadAndSaveIcon(context.TODO(), `C:\Windows\System32\@WLOGO_48x48.png`)
|
icon, err := binmeta.LoadAndSaveIcon(context.TODO(), `C:\Windows\System32\@WLOGO_48x48.png`)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
newProfile.Icons = []icons.Icon{*icon}
|
newProfile.Icons = []binmeta.Icon{*icon}
|
||||||
}
|
}
|
||||||
|
|
||||||
return newProfile
|
return newProfile
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import (
|
|||||||
"github.com/safing/portbase/utils"
|
"github.com/safing/portbase/utils"
|
||||||
"github.com/safing/portmaster/process"
|
"github.com/safing/portmaster/process"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -101,7 +101,7 @@ func (h *WinStoreHandler) CreateProfile(p *process.Process) *profile.Profile {
|
|||||||
if tag, ok := p.GetTag(winStoreAppNameTagKey); ok {
|
if tag, ok := p.GetTag(winStoreAppNameTagKey); ok {
|
||||||
return profile.New(&profile.Profile{
|
return profile.New(&profile.Profile{
|
||||||
Source: profile.SourceLocal,
|
Source: profile.SourceLocal,
|
||||||
Name: icons.GenerateBinaryNameFromPath(tag.Value),
|
Name: binmeta.GenerateBinaryNameFromPath(tag.Value),
|
||||||
PresentationPath: p.Path,
|
PresentationPath: p.Path,
|
||||||
UsePresentationPath: true,
|
UsePresentationPath: true,
|
||||||
Fingerprints: []profile.Fingerprint{
|
Fingerprints: []profile.Fingerprint{
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
"github.com/safing/portbase/api"
|
"github.com/safing/portbase/api"
|
||||||
"github.com/safing/portbase/formats/dsd"
|
"github.com/safing/portbase/formats/dsd"
|
||||||
"github.com/safing/portbase/utils"
|
"github.com/safing/portbase/utils"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func registerAPIEndpoints() error {
|
func registerAPIEndpoints() error {
|
||||||
@@ -99,7 +99,7 @@ func handleGetProfileIcon(ar *api.Request) (data []byte, err error) {
|
|||||||
ext := filepath.Ext(name)
|
ext := filepath.Ext(name)
|
||||||
|
|
||||||
// Get profile icon.
|
// Get profile icon.
|
||||||
data, err = icons.GetProfileIcon(name)
|
data, err = binmeta.GetProfileIcon(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -153,7 +153,7 @@ func handleUpdateProfileIcon(ar *api.Request) (any, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update profile icon.
|
// Update profile icon.
|
||||||
filename, err := icons.UpdateProfileIcon(ar.InputData, ext)
|
filename, err := binmeta.UpdateProfileIcon(ar.InputData, ext)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
//go:build !linux && !windows
|
//go:build !linux && !windows
|
||||||
|
|
||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import "context"
|
import "context"
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
@@ -42,8 +42,8 @@ func (t IconType) sortOrder() int {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// SortAndCompact sorts and compacts a list of icons.
|
// SortAndCompactIcons sorts and compacts a list of icons.
|
||||||
func SortAndCompact(icons []Icon) []Icon {
|
func SortAndCompactIcons(icons []Icon) []Icon {
|
||||||
// Sort.
|
// Sort.
|
||||||
slices.SortFunc[[]Icon, Icon](icons, func(a, b Icon) int {
|
slices.SortFunc[[]Icon, Icon](icons, func(a, b Icon) int {
|
||||||
aOrder := a.Type.sortOrder()
|
aOrder := a.Type.sortOrder()
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package icons
|
package binmeta
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/safing/portbase/database/record"
|
"github.com/safing/portbase/database/record"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MergeProfiles merges multiple profiles into a new one.
|
// MergeProfiles merges multiple profiles into a new one.
|
||||||
@@ -52,12 +52,12 @@ func MergeProfiles(name string, primary *Profile, secondaries ...*Profile) (newP
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Collect all icons.
|
// Collect all icons.
|
||||||
newProfile.Icons = make([]icons.Icon, 0, len(secondaries)+1) // Guess the needed space.
|
newProfile.Icons = make([]binmeta.Icon, 0, len(secondaries)+1) // Guess the needed space.
|
||||||
newProfile.Icons = append(newProfile.Icons, primary.Icons...)
|
newProfile.Icons = append(newProfile.Icons, primary.Icons...)
|
||||||
for _, sp := range secondaries {
|
for _, sp := range secondaries {
|
||||||
newProfile.Icons = append(newProfile.Icons, sp.Icons...)
|
newProfile.Icons = append(newProfile.Icons, sp.Icons...)
|
||||||
}
|
}
|
||||||
newProfile.Icons = icons.SortAndCompact(newProfile.Icons)
|
newProfile.Icons = binmeta.SortAndCompactIcons(newProfile.Icons)
|
||||||
|
|
||||||
// Collect all fingerprints.
|
// Collect all fingerprints.
|
||||||
newProfile.Fingerprints = make([]Fingerprint, 0, len(primary.Fingerprints)+len(secondaries)) // Guess the needed space.
|
newProfile.Fingerprints = make([]Fingerprint, 0, len(primary.Fingerprints)+len(secondaries)) // Guess the needed space.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/safing/portbase/database/migration"
|
"github.com/safing/portbase/database/migration"
|
||||||
"github.com/safing/portbase/database/query"
|
"github.com/safing/portbase/database/query"
|
||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
func registerMigrations() error {
|
func registerMigrations() error {
|
||||||
@@ -103,7 +103,7 @@ func migrateIcons(ctx context.Context, _, to *version.Version, db *database.Inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Migrate to icon list.
|
// Migrate to icon list.
|
||||||
profile.Icons = []icons.Icon{{
|
profile.Icons = []binmeta.Icon{{
|
||||||
Type: profile.IconType,
|
Type: profile.IconType,
|
||||||
Value: profile.Icon,
|
Value: profile.Icon,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portbase/modules"
|
"github.com/safing/portbase/modules"
|
||||||
_ "github.com/safing/portmaster/core/base"
|
_ "github.com/safing/portmaster/core/base"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
"github.com/safing/portmaster/updates"
|
"github.com/safing/portmaster/updates"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ func prep() error {
|
|||||||
if err := iconsDir.Ensure(); err != nil {
|
if err := iconsDir.Ensure(); err != nil {
|
||||||
return fmt.Errorf("failed to create/check icons directory: %w", err)
|
return fmt.Errorf("failed to create/check icons directory: %w", err)
|
||||||
}
|
}
|
||||||
icons.ProfileIconStoragePath = iconsDir.Path
|
binmeta.ProfileIconStoragePath = iconsDir.Path
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import (
|
|||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portbase/utils"
|
"github.com/safing/portbase/utils"
|
||||||
"github.com/safing/portmaster/intel/filterlists"
|
"github.com/safing/portmaster/intel/filterlists"
|
||||||
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
"github.com/safing/portmaster/profile/endpoints"
|
"github.com/safing/portmaster/profile/endpoints"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProfileSource is the source of the profile.
|
// ProfileSource is the source of the profile.
|
||||||
@@ -68,9 +68,9 @@ type Profile struct { //nolint:maligned // not worth the effort
|
|||||||
// See IconType for more information.
|
// See IconType for more information.
|
||||||
Icon string
|
Icon string
|
||||||
// Deprecated: IconType describes the type of the Icon property.
|
// Deprecated: IconType describes the type of the Icon property.
|
||||||
IconType icons.IconType
|
IconType binmeta.IconType
|
||||||
// Icons holds a list of icons to represent the application.
|
// Icons holds a list of icons to represent the application.
|
||||||
Icons []icons.Icon
|
Icons []binmeta.Icon
|
||||||
|
|
||||||
// Deprecated: LinkedPath used to point to the executableis this
|
// Deprecated: LinkedPath used to point to the executableis this
|
||||||
// profile was created for.
|
// profile was created for.
|
||||||
@@ -469,7 +469,7 @@ func (profile *Profile) updateMetadata(binaryPath string) (changed bool) {
|
|||||||
// Set Name if unset.
|
// Set Name if unset.
|
||||||
if profile.Name == "" && profile.PresentationPath != "" {
|
if profile.Name == "" && profile.PresentationPath != "" {
|
||||||
// Generate a default profile name from path.
|
// Generate a default profile name from path.
|
||||||
profile.Name = icons.GenerateBinaryNameFromPath(profile.PresentationPath)
|
profile.Name = binmeta.GenerateBinaryNameFromPath(profile.PresentationPath)
|
||||||
changed = true
|
changed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,7 +514,7 @@ func (profile *Profile) updateMetadataFromSystem(ctx context.Context, md Matchin
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get binary icon and name.
|
// Get binary icon and name.
|
||||||
newIcon, newName, err := icons.GetIconAndName(ctx, profile.PresentationPath, home)
|
newIcon, newName, err := binmeta.GetIconAndName(ctx, profile.PresentationPath, home)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warningf("profile: failed to get binary icon/name for %s: %s", profile.PresentationPath, err)
|
log.Warningf("profile: failed to get binary icon/name for %s: %s", profile.PresentationPath, err)
|
||||||
}
|
}
|
||||||
@@ -534,10 +534,10 @@ func (profile *Profile) updateMetadataFromSystem(ctx context.Context, md Matchin
|
|||||||
// Apply new icon if found.
|
// Apply new icon if found.
|
||||||
if newIcon != nil {
|
if newIcon != nil {
|
||||||
if len(profile.Icons) == 0 {
|
if len(profile.Icons) == 0 {
|
||||||
profile.Icons = []icons.Icon{*newIcon}
|
profile.Icons = []binmeta.Icon{*newIcon}
|
||||||
} else {
|
} else {
|
||||||
profile.Icons = append(profile.Icons, *newIcon)
|
profile.Icons = append(profile.Icons, *newIcon)
|
||||||
profile.Icons = icons.SortAndCompact(profile.Icons)
|
profile.Icons = binmeta.SortAndCompactIcons(profile.Icons)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
"github.com/safing/portbase/config"
|
"github.com/safing/portbase/config"
|
||||||
"github.com/safing/portbase/log"
|
"github.com/safing/portbase/log"
|
||||||
"github.com/safing/portmaster/profile"
|
"github.com/safing/portmaster/profile"
|
||||||
"github.com/safing/portmaster/profile/icons"
|
"github.com/safing/portmaster/profile/binmeta"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProfileExport holds an export of a profile.
|
// ProfileExport holds an export of a profile.
|
||||||
@@ -415,12 +415,12 @@ func ImportProfile(r *ProfileImportRequest, requiredProfileSource profile.Profil
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("%w: icon data is invalid: %w", ErrImportFailed, err)
|
return nil, fmt.Errorf("%w: icon data is invalid: %w", ErrImportFailed, err)
|
||||||
}
|
}
|
||||||
filename, err := icons.UpdateProfileIcon(du.Data, du.MediaType.Subtype)
|
filename, err := binmeta.UpdateProfileIcon(du.Data, du.MediaType.Subtype)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("%w: icon is invalid: %w", ErrImportFailed, err)
|
return nil, fmt.Errorf("%w: icon is invalid: %w", ErrImportFailed, err)
|
||||||
}
|
}
|
||||||
p.Icons = []icons.Icon{{
|
p.Icons = []binmeta.Icon{{
|
||||||
Type: icons.IconTypeAPI,
|
Type: binmeta.IconTypeAPI,
|
||||||
Value: filename,
|
Value: filename,
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user