Fix Docker desktop not found in program plugin issue (#6882)

* Fix docker lnk not found issue

* Add common desktop folder location to desktop program

* Add CommonDesktopDirectory to file watchers
This commit is contained in:
Divyansh Srivastava 2020-10-07 12:27:56 -07:00 committed by GitHub
parent eae0937db0
commit 2bd6c5c664
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -780,8 +780,8 @@ namespace Microsoft.Plugin.Program.Programs
private static ParallelQuery<Win32Program> StartMenuPrograms(IList<string> suffixes)
{
var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Programs);
var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms);
var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu);
List<string> indexLocation = new List<string>() { directory1, directory2 };
return IndexPath(suffixes, indexLocation);
@ -790,7 +790,9 @@ namespace Microsoft.Plugin.Program.Programs
private static ParallelQuery<Win32Program> DesktopPrograms(IList<string> suffixes)
{
var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
List<string> indexLocation = new List<string>() { directory1 };
var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory);
List<string> indexLocation = new List<string>() { directory1, directory2 };
return IndexPath(suffixes, indexLocation);
}

View file

@ -28,9 +28,10 @@ namespace Microsoft.Plugin.Program.Storage
{
string[] paths = new string[]
{
Environment.GetFolderPath(Environment.SpecialFolder.Programs),
Environment.GetFolderPath(Environment.SpecialFolder.CommonPrograms),
Environment.GetFolderPath(Environment.SpecialFolder.StartMenu),
Environment.GetFolderPath(Environment.SpecialFolder.CommonStartMenu),
Environment.GetFolderPath(Environment.SpecialFolder.Desktop),
Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory),
};
return paths;
}