From 2bd6c5c664b72a4cfb792d0d6c85e2728a97cd3c Mon Sep 17 00:00:00 2001 From: Divyansh Srivastava Date: Wed, 7 Oct 2020 12:27:56 -0700 Subject: [PATCH] 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 --- .../Microsoft.Plugin.Program/Programs/Win32Program.cs | 8 +++++--- .../Storage/Win32ProgramFileSystemWatchers.cs | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs index 6d1077890f..a75be107fe 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Programs/Win32Program.cs @@ -780,8 +780,8 @@ namespace Microsoft.Plugin.Program.Programs private static ParallelQuery StartMenuPrograms(IList 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 indexLocation = new List() { directory1, directory2 }; return IndexPath(suffixes, indexLocation); @@ -790,7 +790,9 @@ namespace Microsoft.Plugin.Program.Programs private static ParallelQuery DesktopPrograms(IList suffixes) { var directory1 = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); - List indexLocation = new List() { directory1 }; + var directory2 = Environment.GetFolderPath(Environment.SpecialFolder.CommonDesktopDirectory); + + List indexLocation = new List() { directory1, directory2 }; return IndexPath(suffixes, indexLocation); } diff --git a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Storage/Win32ProgramFileSystemWatchers.cs b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Storage/Win32ProgramFileSystemWatchers.cs index e1a256b570..cb7ff19354 100644 --- a/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Storage/Win32ProgramFileSystemWatchers.cs +++ b/src/modules/launcher/Plugins/Microsoft.Plugin.Program/Storage/Win32ProgramFileSystemWatchers.cs @@ -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; }