From afbd4e3b48447a004853efb32e10f871f6ddb422 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 26 May 2013 21:24:56 -0400 Subject: add debug logging messages --- MediaBrowser.Server.Implementations/Library/LibraryManager.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Server.Implementations/Library/LibraryManager.cs') diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs index ae0607689..c82ebad51 100644 --- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs +++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs @@ -405,6 +405,7 @@ namespace MediaBrowser.Server.Implementations.Library if (!fileInfo.Exists) { + _logger.Error("Path in library does not exist or is unavailable: " + path); return null; } @@ -437,8 +438,10 @@ namespace MediaBrowser.Server.Implementations.Library { 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)))) + foreach (var subPath in paths + .Where(subPath => !subPath.EndsWith(":\\", StringComparison.OrdinalIgnoreCase) && paths.Any(i => subPath.StartsWith(i.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase)))) { + _logger.Info("Ignoring duplicate path: {0}", subPath); args.FileSystemDictionary.Remove(subPath); } } -- cgit v1.2.3