Fixed: Performance issue when scanning large root folder

This commit is contained in:
Taloth Saldono
2020-05-13 21:27:39 +02:00
committed by Qstick
parent 942d239092
commit 4606503818
4 changed files with 139 additions and 35 deletions
@@ -142,6 +142,13 @@ namespace NzbDrone.Common.Disk
}
}
public bool FolderEmpty(string path)
{
Ensure.That(path, () => path).IsValidPath();
return Directory.EnumerateDirectories(path).Empty();
}
public string[] GetDirectories(string path)
{
Ensure.That(path, () => path).IsValidPath();