Now hidden files are ignored :). Fixes #166.

pull/2/head
Leonardo Galli 8 years ago
parent 92e9dc6ee1
commit 81ebbcad70

@ -149,9 +149,13 @@ namespace NzbDrone.Core.RootFolders
foreach (string unmappedFolder in unmappedFolders) foreach (string unmappedFolder in unmappedFolders)
{ {
var di = new DirectoryInfo(unmappedFolder.Normalize()); var di = new DirectoryInfo(unmappedFolder.Normalize());
if (!di.Attributes.HasFlag(FileAttributes.System) && !di.Attributes.HasFlag(FileAttributes.Hidden))
{
results.Add(new UnmappedFolder { Name = di.Name, Path = di.FullName }); results.Add(new UnmappedFolder { Name = di.Name, Path = di.FullName });
} }
}
var setToRemove = SpecialFolders; var setToRemove = SpecialFolders;
results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name)); results.RemoveAll(x => setToRemove.Contains(new DirectoryInfo(x.Path.ToLowerInvariant()).Name));

Loading…
Cancel
Save