aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-24 13:48:48 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-24 13:48:48 -0400
commit7a5ba39603c2a0c970c619016686431b7ff14df1 (patch)
treed80da83a6f8b0bfd5d59cb204a933ab90c36f219 /MediaBrowser.Server.Implementations/Library/LibraryManager.cs
parent398b658dbe72c6efa932b9d097916ea586b8eb9f (diff)
fixes #305 - Multiple collections
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 13857a656..af0212738 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -430,6 +430,18 @@ namespace MediaBrowser.Server.Implementations.Library
var flattenFolderDepth = isPhysicalRoot ? 2 : 0;
args.FileSystemDictionary = FileData.GetFilteredFileSystemEntries(args.Path, _logger, flattenFolderDepth: flattenFolderDepth, args: args, resolveShortcuts: isPhysicalRoot || args.IsVf);
+
+ // Need to remove subpaths that may have been resolved from shortcuts
+ // Example: if \\server\movies exists, then strip out \\server\movies\action
+ if (isPhysicalRoot)
+ {
+ var paths = args.FileSystemDictionary.Keys.ToList();
+
+ foreach (var subPath in paths.Where(subPath => paths.Any(i => subPath.StartsWith(i.TrimEnd(System.IO.Path.DirectorySeparatorChar) + System.IO.Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase))))
+ {
+ args.FileSystemDictionary.Remove(subPath);
+ }
+ }
}
// Check to see if we should resolve based on our contents