mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Disable recursive search for PATH folders
This commit is contained in:
parent
efd1b6cfdd
commit
0635ebd28b
1 changed files with 3 additions and 3 deletions
|
|
@ -318,14 +318,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
}
|
||||
}
|
||||
|
||||
private static IEnumerable<string> ProgramPaths(string directory, string[] suffixes)
|
||||
private static IEnumerable<string> ProgramPaths(string directory, string[] suffixes, bool recursive=true)
|
||||
{
|
||||
if (!Directory.Exists(directory))
|
||||
return Enumerable.Empty<string>();
|
||||
|
||||
return Directory.EnumerateFiles(directory, "*", new EnumerationOptions
|
||||
{
|
||||
IgnoreInaccessible = true, RecurseSubdirectories = true
|
||||
IgnoreInaccessible = true, RecurseSubdirectories = recursive
|
||||
}).Where(x => suffixes.Contains(Extension(x)));
|
||||
}
|
||||
|
||||
|
|
@ -393,7 +393,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
|
||||
foreach (var path in paths)
|
||||
{
|
||||
var p = ProgramPaths(path, suffixes);
|
||||
var p = ProgramPaths(path, suffixes, recursive:false);
|
||||
toFilter.AddRange(p);
|
||||
}
|
||||
var programs = ExceptDisabledSource(toFilter.Distinct())
|
||||
|
|
|
|||
Loading…
Reference in a new issue