add error handling when resolving shortcuts
This commit is contained in:
parent
ae76e1c725
commit
1a1fbec334
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user