Skip to content

Commit c2f5e5b

Browse files
Merge pull request #1551 from VictoriousRaptor/ProgramIndexPATH
Fix #1546
2 parents 826a422 + a73c22f commit c2f5e5b

File tree

1 file changed

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

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,9 @@ private static IEnumerable<Win32> PATHPrograms(string[] suffixes, string[] proto
447447

448448
var paths = pathEnv.Split(";", StringSplitOptions.RemoveEmptyEntries).DistinctBy(p => p.ToLowerInvariant());
449449

450-
paths = paths.Where(x => commonParents.All(parent => !x.StartsWith(parent, StringComparison.OrdinalIgnoreCase)));
451-
452-
var toFilter = paths.AsParallel().SelectMany(p => EnumerateProgramsInDir(p, suffixes, recursive: false));
450+
var toFilter = paths.Where(x => commonParents.All(parent => !IsSubPathOf(x, parent)))
451+
.AsParallel()
452+
.SelectMany(p => EnumerateProgramsInDir(p, suffixes, recursive: false));
453453

454454
var programs = ExceptDisabledSource(toFilter.Distinct())
455455
.Select(x => GetProgramFromPath(x, protocols));

0 commit comments

Comments
 (0)