mirror of
https://github.com/Sonarr/Sonarr
synced 2026-05-09 05:40:53 +02:00
New: Ignore inaccessible folders when getting folders
This commit is contained in:
parent
f8e81396d4
commit
a30e9da767
1 changed files with 5 additions and 1 deletions
|
|
@ -153,7 +153,11 @@ public IEnumerable<string> GetDirectories(string path)
|
|||
{
|
||||
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs);
|
||||
|
||||
return Directory.EnumerateDirectories(path);
|
||||
return Directory.EnumerateDirectories(path, "*", new EnumerationOptions
|
||||
{
|
||||
AttributesToSkip = FileAttributes.System,
|
||||
IgnoreInaccessible = true
|
||||
});
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetFiles(string path, bool recursive)
|
||||
|
|
|
|||
Loading…
Reference in a new issue