diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-17 22:43:34 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-09-17 22:43:34 -0400 |
| commit | 60780399c51165a06a04d8a01d59252bc9c82d7f (patch) | |
| tree | 53edb713a4d311234b21eebfa091a6c2bf382db5 /MediaBrowser.Controller/IO/FileData.cs | |
| parent | 06c611dd50d37b786a957cea7308fb30e926a919 (diff) | |
allow request header overrides
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/FileData.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs index dc2b49c75..b1fc28e7b 100644 --- a/MediaBrowser.Controller/IO/FileData.cs +++ b/MediaBrowser.Controller/IO/FileData.cs @@ -3,8 +3,6 @@ using MediaBrowser.Model.Logging; using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using MoreLinq; namespace MediaBrowser.Controller.IO { @@ -40,9 +38,14 @@ namespace MediaBrowser.Controller.IO if (!resolveShortcuts && flattenFolderDepth == 0) { // Seeing dupes on some users file system for some reason - return entries - .DistinctBy(i => i.FullName, StringComparer.OrdinalIgnoreCase) - .ToDictionary(i => i.FullName, StringComparer.OrdinalIgnoreCase); + var dictionary = new Dictionary<string, FileSystemInfo>(StringComparer.OrdinalIgnoreCase); + + foreach (var info in entries) + { + dictionary[info.FullName] = info; + } + + return dictionary; } var dict = new Dictionary<string, FileSystemInfo>(StringComparer.OrdinalIgnoreCase); |
