diff --git a/Wox.UI.Flutter/wox/pubspec.lock b/Wox.UI.Flutter/wox/pubspec.lock index 20551d95..c304acc2 100644 --- a/Wox.UI.Flutter/wox/pubspec.lock +++ b/Wox.UI.Flutter/wox/pubspec.lock @@ -950,10 +950,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f652077d0bdf60abe4c1f6377448e8655008eef28f128bc023f7b5e8dfeb48fc + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "14.2.4" + version: "14.2.5" web: dependency: transitive description: diff --git a/Wox/plugin/system/app/app_darwin.go b/Wox/plugin/system/app/app_darwin.go index 6f06ca06..66248e52 100644 --- a/Wox/plugin/system/app/app_darwin.go +++ b/Wox/plugin/system/app/app_darwin.go @@ -17,20 +17,22 @@ import ( "crypto/md5" "errors" "fmt" - "github.com/disintegration/imaging" - "github.com/mitchellh/go-homedir" - "github.com/tidwall/gjson" - "howett.net/plist" "image" "io" "os" "os/exec" "path" + "path/filepath" "strings" "sync" "unsafe" "wox/plugin" "wox/util" + + "github.com/disintegration/imaging" + "github.com/mitchellh/go-homedir" + "github.com/tidwall/gjson" + "howett.net/plist" ) var appRetriever = &MacRetriever{} @@ -88,6 +90,10 @@ func (a *MacRetriever) ParseAppInfo(ctx context.Context, path string) (appInfo, } appName := strings.TrimSpace(string(out)) + if appName == "(null)" { + appName = filepath.Base(path) + a.api.Log(ctx, plugin.LogLevelWarning, fmt.Sprintf("failed to get app name from mdls(%s), using filename instead", path)) + } for _, extension := range a.GetAppExtensions(ctx) { if strings.HasSuffix(appName, "."+extension) { appName = appName[:len(appName)-len(extension)-1]