update file system methods

This commit is contained in:
Luke Pulverenti
2015-09-24 13:50:49 -04:00
parent 76875e17ee
commit f3e9bbed23
15 changed files with 42 additions and 29 deletions

View File

@@ -122,10 +122,10 @@ namespace MediaBrowser.Common.Implementations.ScheduledTasks.Tasks
private void DeleteEmptyFolders(string parent)
{
foreach (var directory in Directory.GetDirectories(parent))
foreach (var directory in _fileSystem.GetDirectoryPaths(parent))
{
DeleteEmptyFolders(directory);
if (!Directory.EnumerateFileSystemEntries(directory).Any())
if (!_fileSystem.GetFileSystemEntryPaths(directory).Any())
{
_fileSystem.DeleteDirectory(directory, false);
}