add error handling when resolving shortcuts

This commit is contained in:
Luke Pulverenti 2015-11-30 22:54:24 -05:00
parent ae76e1c725
commit 1a1fbec334

View File

@ -59,6 +59,8 @@ namespace MediaBrowser.Controller.IO
var fullName = entry.FullName;
if (resolveShortcuts && fileSystem.IsShortcut(fullName))
{
try
{
var newPath = fileSystem.ResolveShortcut(fullName);
@ -77,6 +79,11 @@ namespace MediaBrowser.Controller.IO
dict[newPath] = data;
}
catch (Exception ex)
{
logger.ErrorException("Error resolving shortcut from {0}", ex, fullName);
}
}
else if (flattenFolderDepth > 0 && isDirectory)
{
foreach (var child in GetFilteredFileSystemEntries(directoryService, fullName, fileSystem, logger, args, flattenFolderDepth: flattenFolderDepth - 1, resolveShortcuts: resolveShortcuts))