mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
Special folders also apply to RootFolder unmapped folders
This commit is contained in:
@@ -99,7 +99,7 @@ namespace NzbDrone.Core.RootFolders
|
||||
throw new ArgumentException("Invalid path provided", "path");
|
||||
|
||||
var results = new List<UnmappedFolder>();
|
||||
var series = _seriesRepository.All();
|
||||
var series = _seriesRepository.All().ToList();
|
||||
|
||||
if (!_diskProvider.FolderExists(path))
|
||||
{
|
||||
@@ -116,6 +116,12 @@ namespace NzbDrone.Core.RootFolders
|
||||
}
|
||||
}
|
||||
|
||||
if (Path.GetPathRoot(path).Equals(path, StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
var setToRemove = _diskProvider.SpecialFolders;
|
||||
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));
|
||||
}
|
||||
|
||||
Logger.Debug("{0} unmapped folders detected.", results.Count);
|
||||
return results;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user