From d74e3b2dea894a7cdc3defac418069081dd2ae22 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 25 Oct 2014 14:32:58 -0400 Subject: connect updates --- MediaBrowser.Controller/IO/FileData.cs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'MediaBrowser.Controller/IO/FileData.cs') diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index 4ee8a810b..fb0f07331 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -25,7 +25,13 @@ namespace MediaBrowser.Controller.IO /// if set to true [resolve shortcuts]. /// Dictionary{System.StringFileSystemInfo}. /// path - public static Dictionary GetFilteredFileSystemEntries(IDirectoryService directoryService, string path, IFileSystem fileSystem, ILogger logger, ItemResolveArgs args, int flattenFolderDepth = 0, bool resolveShortcuts = true) + public static Dictionary GetFilteredFileSystemEntries(IDirectoryService directoryService, + string path, + IFileSystem fileSystem, + ILogger logger, + ItemResolveArgs args, + int flattenFolderDepth = 0, + bool resolveShortcuts = true) { if (string.IsNullOrEmpty(path)) { @@ -36,21 +42,13 @@ namespace MediaBrowser.Controller.IO throw new ArgumentNullException("args"); } - var entries = directoryService.GetFileSystemEntries(path); - if (!resolveShortcuts && flattenFolderDepth == 0) { - // Seeing dupes on some users file system for some reason - var dictionary = new Dictionary(StringComparer.OrdinalIgnoreCase); - - foreach (var info in entries) - { - dictionary[info.FullName] = info; - } - - return dictionary; + return directoryService.GetFileSystemDictionary(path); } + var entries = directoryService.GetFileSystemEntries(path); + var dict = new Dictionary(StringComparer.OrdinalIgnoreCase); foreach (var entry in entries) -- cgit v1.2.3