1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 17:17:02 +00:00

Updated diskprovider to use GetFiles instead of EnumerateFiles to prevent a screwed up issue.

This commit is contained in:
kay.one 2012-01-22 22:43:11 -08:00
parent ead5f37921
commit 7071cf829a
3 changed files with 6 additions and 6 deletions

View file

@ -52,14 +52,14 @@ public virtual bool FileExists(string path)
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)

View file

@ -267,7 +267,7 @@ public void all_imported_files_should_be_moved()
[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",

View file

@ -23,7 +23,7 @@ public void setup()
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",