mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
skip broken folder when re-index (#2004)
* skip broken folder when re-index * add log for DirectoryNotFoundException
This commit is contained in:
parent
c393db9c9f
commit
be43c2156f
1 changed files with 9 additions and 1 deletions
|
|
@ -216,7 +216,15 @@ namespace Wox.Plugin.Program.Programs
|
|||
{
|
||||
foreach (var suffix in suffixes)
|
||||
{
|
||||
files.AddRange(Directory.EnumerateFiles(currentDirectory, $"*.{suffix}", SearchOption.TopDirectoryOnly));
|
||||
try
|
||||
{
|
||||
files.AddRange(Directory.EnumerateFiles(currentDirectory, $"*.{suffix}", SearchOption.TopDirectoryOnly));
|
||||
}
|
||||
catch (DirectoryNotFoundException e)
|
||||
{
|
||||
Log.Exception($"|Program.Win32.ProgramPaths|skip directory(<{currentDirectory}>)", e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e) when (e is SecurityException || e is UnauthorizedAccessException)
|
||||
|
|
|
|||
Loading…
Reference in a new issue