diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index 5352dbb71..7e597b424 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -379,12 +379,15 @@ namespace Flow.Launcher.Plugin.Program.Programs private static IEnumerable UnregisteredPrograms(List sources, string[] suffixes, string[] protocols) { // Disabled custom sources are not in DisabledProgramSources - var paths = ExceptDisabledSource(sources.Where(s => Directory.Exists(s.Location) && s.Enabled) + var paths = sources.Where(s => Directory.Exists(s.Location) && s.Enabled) + .Distinct() .AsParallel() - .SelectMany(s => ProgramPaths(s.Location, suffixes))) - .Distinct(); + .SelectMany(s => ProgramPaths(s.Location, suffixes)); - var programs = paths.Select(x => GetProgramFromPath(x, protocols)); + // Remove disabled programs in DisabledProgramSources + var programs = ExceptDisabledSource(paths) + + .Select(x => GetProgramFromPath(x, protocols)); return programs; } @@ -569,7 +572,7 @@ namespace Flow.Launcher.Plugin.Program.Programs programs = programs.Concat(unregistered); - var autoIndexPrograms = Enumerable.Empty(); + var autoIndexPrograms = Enumerable.Empty(); // for single programs, not folders if (settings.EnableRegistrySource) {