mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Fixed: Ignore '.unwanted' directory when importing.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using FizzWare.NBuilder;
|
||||
@@ -93,6 +93,7 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
[TestCase("Plex Versions")]
|
||||
[TestCase(".secret")]
|
||||
[TestCase(".hidden")]
|
||||
[TestCase(".unwanted")]
|
||||
public void should_filter_certain_sub_folders(string subFolder)
|
||||
{
|
||||
var path = @"C:\Test\";
|
||||
@@ -100,13 +101,9 @@ namespace NzbDrone.Core.Test.ProviderTests.DiskScanProviderTests
|
||||
var specialFiles = GetFiles(path, subFolder).ToList();
|
||||
var allFiles = files.Concat(specialFiles);
|
||||
|
||||
var artist = Builder<Artist>.CreateNew()
|
||||
.With(s => s.Path = path)
|
||||
.Build();
|
||||
|
||||
var filteredFiles = Subject.FilterFiles(artist, allFiles);
|
||||
var filteredFiles = Subject.FilterFiles(path, allFiles);
|
||||
filteredFiles.Should().NotContain(specialFiles);
|
||||
filteredFiles.Count.Should().BeGreaterThan(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user