Merge pull request #1514 from VictoriousRaptor/Fix1476

[Dev] Fix unwanted URL protocols and invalid programs in custom sources
This commit is contained in:
VictoriousRaptor 2022-11-04 11:37:42 +08:00 committed by GitHub
commit 3a56bf4e1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -390,7 +390,6 @@ namespace Flow.Launcher.Plugin.Program.Programs
_ => Win32Program(x) _ => Win32Program(x)
}); });
return programs; return programs;
} }
@ -411,7 +410,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
ShortcutExtension => LnkProgram(x), ShortcutExtension => LnkProgram(x),
UrlExtension => UrlProgram(x), UrlExtension => UrlProgram(x),
_ => Win32Program(x) _ => Win32Program(x)
}).Where(x => x.Valid); });
return programs; return programs;
} }
@ -569,7 +568,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
autoIndexPrograms = ProgramsHasher(autoIndexPrograms); autoIndexPrograms = ProgramsHasher(autoIndexPrograms);
return programs.Concat(autoIndexPrograms).Distinct().ToArray(); return programs.Concat(autoIndexPrograms).Where(x => x.Valid).Distinct().ToArray();
} }
#if DEBUG //This is to make developer aware of any unhandled exception and add in handling. #if DEBUG //This is to make developer aware of any unhandled exception and add in handling.
catch (Exception) catch (Exception)