1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-01-03 13:45:02 +00:00

New: Ignore inaccessible folders when getting folders

This commit is contained in:
Bogdan 2024-06-14 20:22:43 +03:00 committed by Mark McDowall
parent f8e81396d4
commit a30e9da767

View file

@ -153,7 +153,11 @@ namespace NzbDrone.Common.Disk
{ {
Ensure.That(path, () => path).IsValidPath(PathValidationType.CurrentOs); 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) public IEnumerable<string> GetFiles(string path, bool recursive)