Skip to content

Commit 3347e9f

Browse files
Refactor
1 parent d661836 commit 3347e9f

File tree

1 file changed

+2
-8
lines changed
  • Plugins/Flow.Launcher.Plugin.Program/Programs

1 file changed

+2
-8
lines changed

Plugins/Flow.Launcher.Plugin.Program/Programs/Win32.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ private static IEnumerable<Win32> UnregisteredPrograms(List<ProgramSource> sourc
385385
.SelectMany(s => ProgramPaths(s.Location, suffixes));
386386

387387
// Remove disabled programs in DisabledProgramSources
388-
var programs = ExceptDisabledSource(paths)
388+
var programs = ExceptDisabledSource(paths).Select(x => GetProgramFromPath(x, protocols));
389389

390390
.Select(x => GetProgramFromPath(x, protocols));
391391
return programs;
@@ -418,13 +418,7 @@ private static IEnumerable<Win32> PATHPrograms(string[] suffixes, string[] proto
418418
var toFilter = paths.AsParallel().SelectMany(p => ProgramPaths(p, suffixes, recursive: false));
419419

420420
var programs = ExceptDisabledSource(toFilter.Distinct())
421-
.Select(x => Extension(x) switch
422-
{
423-
ShortcutExtension => LnkProgram(x),
424-
UrlExtension => UrlProgram(x, protocols),
425-
ExeExtension => ExeProgram(x),
426-
_ => Win32Program(x)
427-
});
421+
.Select(x => GetProgramFromPath(x, protocols));
428422
return programs;
429423
}
430424

0 commit comments

Comments
 (0)