Special folders also apply to RootFolder unmapped folders

This commit is contained in:
Mark McDowall 2013-08-04 10:04:36 -07:00
commit 19906e0350
3 changed files with 22 additions and 6 deletions

View file

@ -35,8 +35,8 @@ namespace NzbDrone.Common
if (Path.GetPathRoot(path).Equals(path, StringComparison.InvariantCultureIgnoreCase))
{
var setToRemove = new HashSet<string> { "$Recycle.Bin", "System Volume Information" };
dirsList.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x).Name));
var setToRemove = _diskProvider.SpecialFolders;
dirsList.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.ToLowerInvariant()).Name));
}
dirs = dirsList;