Fix indexing unwanted protocols in custom sources

This commit is contained in:
Vic 2022-11-03 16:10:11 +08:00
parent f6c842de2d
commit a523584c67

View file

@ -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<string> GetPathFromRegistry(RegistryKey root)