aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/IO/FileData.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-26 21:24:07 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-05-26 21:24:07 -0400
commit826c749774e85dc2c4ecc91f29bc29e7f13755fd (patch)
tree6f67c114e6ac8aa2a1399d4e9937580d59422bb7 /MediaBrowser.Controller/IO/FileData.cs
parent82ce0e17e95967109832843cbfb570a772719401 (diff)
fixed issue preventing drive contents from being read
Diffstat (limited to 'MediaBrowser.Controller/IO/FileData.cs')
-rw-r--r--MediaBrowser.Controller/IO/FileData.cs20
1 files changed, 4 insertions, 16 deletions
diff --git a/MediaBrowser.Controller/IO/FileData.cs b/MediaBrowser.Controller/IO/FileData.cs
index 4b5aed3ab..79ba0a64f 100644
--- a/MediaBrowser.Controller/IO/FileData.cs
+++ b/MediaBrowser.Controller/IO/FileData.cs
@@ -3,7 +3,6 @@ using MediaBrowser.Model.Logging;
using System;
using System.Collections.Generic;
using System.IO;
-using System.Linq;
namespace MediaBrowser.Controller.IO
{
@@ -41,28 +40,17 @@ namespace MediaBrowser.Controller.IO
if (resolveShortcuts && FileSystem.IsShortcut(entry.FullName))
{
var newPath = FileSystem.ResolveShortcut(entry.FullName);
+
if (string.IsNullOrWhiteSpace(newPath))
{
//invalid shortcut - could be old or target could just be unavailable
- logger.Warn("Encountered invalid shortuct: " + entry.FullName);
+ logger.Warn("Encountered invalid shortcut: " + entry.FullName);
continue;
}
- var data = FileSystem.GetFileSystemInfo(newPath);
- if (data.Exists)
- {
- // Find out if the shortcut is pointing to a directory or file
- if (data.Attributes.HasFlag(FileAttributes.Directory))
- {
- // add to our physical locations
- if (args != null)
- {
- args.AddAdditionalLocation(newPath);
- }
- }
+ var data = FileSystem.GetFileSystemInfo(newPath);
- dict[data.FullName] = data;
- }
+ dict[data.FullName] = data;
}
else if (flattenFolderDepth > 0 && isDirectory)
{