mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix unauthorize exception lead to the whole directory unable to index.
This commit is contained in:
parent
98630d1af5
commit
27313cdddc
1 changed files with 7 additions and 3 deletions
|
|
@ -267,10 +267,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
||||||
return new string[] { };
|
return new string[] { };
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var paths = Directory.EnumerateFiles(directory, "*", SearchOption.AllDirectories)
|
var paths = Directory.EnumerateFiles(directory, "*", new EnumerationOptions
|
||||||
|
{
|
||||||
|
IgnoreInaccessible = true,
|
||||||
|
RecurseSubdirectories = true
|
||||||
|
})
|
||||||
.Where(x => suffixes.Contains(Extension(x)));
|
.Where(x => suffixes.Contains(Extension(x)));
|
||||||
return paths;
|
|
||||||
|
|
||||||
|
return paths;
|
||||||
}
|
}
|
||||||
catch (DirectoryNotFoundException e)
|
catch (DirectoryNotFoundException e)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue