From a523584c672d60832ef3a9c1b9f544469a6f8949 Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Thu, 3 Nov 2022 16:10:11 +0800 Subject: [PATCH] Fix indexing unwanted protocols in custom sources --- Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs index c540106cd..f32f14613 100644 --- a/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs +++ b/Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs @@ -390,8 +390,7 @@ namespace Flow.Launcher.Plugin.Program.Programs ShortcutExtension => LnkProgram(x), UrlExtension => UrlProgram(x), _ => Win32Program(x) - }); - + }).Where(x => x.Valid); return programs; } @@ -442,7 +441,7 @@ namespace Flow.Launcher.Plugin.Program.Programs var filtered = ExceptDisabledSource(toFilter); - return filtered.Select(GetProgramFromPath).ToList(); // ToList due to disposing issue + return filtered.Select(GetProgramFromPath).Where(x => x.Valid).ToList(); // ToList due to disposing issue } private static IEnumerable GetPathFromRegistry(RegistryKey root)