mirror of https://github.com/Radarr/Radarr
Updated diskprovider to use GetFiles instead of EnumerateFiles to prevent a screwed up issue.
This commit is contained in:
parent
ead5f37921
commit
7071cf829a
|
@ -52,14 +52,14 @@ namespace NzbDrone.Common
|
|||
return File.Exists(path);
|
||||
}
|
||||
|
||||
public virtual IEnumerable<string> GetDirectories(string path)
|
||||
public virtual string[] GetDirectories(string path)
|
||||
{
|
||||
return Directory.EnumerateDirectories(path);
|
||||
return Directory.GetDirectories(path);
|
||||
}
|
||||
|
||||
public virtual IEnumerable<string> GetFiles(string path, SearchOption searchOption)
|
||||
public virtual string[] GetFiles(string path, SearchOption searchOption)
|
||||
{
|
||||
return Directory.EnumerateFiles(path, "*.*", searchOption);
|
||||
return Directory.GetFiles(path, "*.*", searchOption);
|
||||
}
|
||||
|
||||
public virtual long GetDirectorySize(string path)
|
||||
|
|
|
@ -267,7 +267,7 @@ namespace NzbDrone.Core.Test.ProviderTests.PostDownloadProviderTests
|
|||
[Test]
|
||||
public void ProcessDropFolder_should_only_process_folders_that_arent_known_series_folders()
|
||||
{
|
||||
var subFolders = new List<string>
|
||||
var subFolders = new []
|
||||
{
|
||||
@"c:\drop\episode1",
|
||||
@"c:\drop\episode2",
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace NzbDrone.Core.Test.ProviderTests.UpdateProviderTests
|
|||
|
||||
Mocker.GetMock<DiskProvider>()
|
||||
.Setup(c => c.GetFiles(UpdateLogFolder, SearchOption.TopDirectoryOnly))
|
||||
.Returns(new List<string>
|
||||
.Returns(new []
|
||||
{
|
||||
"C:\\nzbdrone\\update\\2011.09.20-19-08.txt",
|
||||
"C:\\nzbdrone\\update\\2011.10.20-20-08.txt",
|
||||
|
|
Loading…
Reference in New Issue