fixed issue preventing drive contents from being read

This commit is contained in:
Luke Pulverenti
2013-05-26 21:24:07 -04:00
parent 82ce0e17e9
commit 826c749774
3 changed files with 8 additions and 18 deletions

View File

@@ -391,8 +391,10 @@ namespace MediaBrowser.Controller.Entities
{
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(System.IO.Path.DirectorySeparatorChar) + System.IO.Path.DirectorySeparatorChar, StringComparison.OrdinalIgnoreCase))))
{
Logger.Info("Ignoring duplicate path: {0}", subPath);
args.FileSystemDictionary.Remove(subPath);
}
}