1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00

New: Ignore inaccessible folders when getting folders

(cherry picked from commit a30e9da7672a202cb9e9188cf106afc34a5d0361)
This commit is contained in:
Bogdan 2024-06-14 20:22:43 +03:00
parent 3a74393d05
commit 5fc63ecb3f

View File

@ -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)