1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-06-30 17:43:59 +02:00

Compare commits

..

2 Commits

Author SHA1 Message Date
HamletDuFromage
24c4ba6f02
Merge 12f8312eec into 5fc63ecb3f 2024-06-18 18:07:33 +05:30
Bogdan
5fc63ecb3f New: Ignore inaccessible folders when getting folders
(cherry picked from commit a30e9da7672a202cb9e9188cf106afc34a5d0361)
2024-06-18 06:55:13 +03:00

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)