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
|
|
@ -131,7 +131,7 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
? $"/select,\"{FullPath}\""
|
||||
: Settings.ExplorerArgs;
|
||||
|
||||
Main.StartProcess(Process.Start,
|
||||
Main.StartProcess(Process.Start,
|
||||
new ProcessStartInfo(
|
||||
!string.IsNullOrWhiteSpace(Main._settings.CustomizedExplorer)
|
||||
? Main._settings.CustomizedExplorer
|
||||
|
|
@ -267,10 +267,14 @@ namespace Flow.Launcher.Plugin.Program.Programs
|
|||
return new string[] { };
|
||||
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)));
|
||||
return paths;
|
||||
|
||||
return paths;
|
||||
}
|
||||
catch (DirectoryNotFoundException e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue