File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Plugins/Flow.Launcher.Plugin.Program/Programs Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,6 @@ private static IEnumerable<Win32> UnregisteredPrograms(List<Settings.ProgramSour
361
361
362
362
private static IEnumerable < Win32 > StartMenuPrograms ( string [ ] suffixes )
363
363
{
364
- var disabledProgramsList = Main . _settings . DisabledProgramSources ;
365
364
366
365
var directory1 = Environment . GetFolderPath ( Environment . SpecialFolder . Programs ) ;
367
366
var directory2 = Environment . GetFolderPath ( Environment . SpecialFolder . CommonPrograms ) ;
@@ -381,21 +380,15 @@ private static IEnumerable<Win32> StartMenuPrograms(string[] suffixes)
381
380
382
381
private static IEnumerable < Win32 > PATHPrograms ( string [ ] suffixes )
383
382
{
384
- var disabledProgramsList = Main . _settings . DisabledProgramSources ;
385
-
386
- string ? pathEnv = Environment . GetEnvironmentVariable ( "Path" ) ;
383
+ var pathEnv = Environment . GetEnvironmentVariable ( "Path" ) ;
387
384
if ( String . IsNullOrEmpty ( pathEnv ) ) {
388
385
return Array . Empty < Win32 > ( ) ;
389
386
}
390
387
391
- var toFilter = new List < string > ( ) ;
392
388
var paths = pathEnv . Split ( ";" , StringSplitOptions . RemoveEmptyEntries ) . DistinctBy ( p => p . ToLower ( ) ) ;
393
389
394
- foreach ( var path in paths )
395
- {
396
- var p = ProgramPaths ( path , suffixes , recursive : false ) ;
397
- toFilter . AddRange ( p ) ;
398
- }
390
+ var toFilter = paths . SelectMany ( p => ProgramPaths ( p , suffixes , recursive : false ) ) ;
391
+
399
392
var programs = ExceptDisabledSource ( toFilter . Distinct ( ) )
400
393
. Select ( x => Extension ( x ) switch
401
394
{
You can’t perform that action at this time.
0 commit comments