Skip to content

Commit

Permalink
Fix #4108 Add appdata directory for app plugin on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
qianlifeng committed Nov 26, 2024
1 parent 8e1a744 commit f6ba7e4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Wox/plugin/system/app/app_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ func (a *WindowsRetriever) GetAppDirectories(ctx context.Context) []appDirectory
Recursive: true,
RecursiveDepth: 2,
},
{
Path: usr.HomeDir + "\\AppData\\Local",
Recursive: true,
RecursiveDepth: 4,
},
{
Path: "C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs",
Recursive: true,
Expand Down Expand Up @@ -119,9 +124,9 @@ func (a *WindowsRetriever) parseShortcut(ctx context.Context, appPath string) (a

return appInfo{
Name: strings.TrimSuffix(filepath.Base(appPath), filepath.Ext(appPath)),
Path: targetPath,
Path: filepath.Clean(targetPath),
Icon: icon,
Type: AppTypeDesktop, // 使用常量
Type: AppTypeDesktop,
}, nil
}

Expand All @@ -142,7 +147,7 @@ func (a *WindowsRetriever) parseExe(ctx context.Context, appPath string) (appInf

return appInfo{
Name: strings.TrimSuffix(filepath.Base(appPath), filepath.Ext(appPath)),
Path: appPath,
Path: filepath.Clean(appPath),
Icon: icon,
Type: AppTypeDesktop, // 使用常量
}, nil
Expand Down

0 comments on commit f6ba7e4

Please sign in to comment.