diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-11 16:35:54 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-11 16:35:54 -0400 |
| commit | 35d9b29c97379b40a6ba4554bd066cc2c25217ee (patch) | |
| tree | b805cad6033ca3f0747c860d3f8241e9523fd40e /MediaBrowser.Controller/Entities/BaseItem.cs | |
| parent | 5843c0936ce912f4457cf6ec66a6e2409a473432 (diff) | |
fixed issue of not seeing network shares
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 974b3f864..2852843ef 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -279,7 +279,7 @@ namespace MediaBrowser.Controller.Entities // Record the name of each file // Need to sort these because accoring to msdn docs, our i/o methods are not guaranteed in any order foreach (var file in ResolveArgs.FileSystemChildren - .Where(i => !i.Attributes.HasFlag(FileAttributes.System)) + .Where(i => (i.Attributes & FileAttributes.System) != FileAttributes.System) .OrderBy(f => f.Name)) { sb.Append(file.Name); @@ -363,12 +363,15 @@ namespace MediaBrowser.Controller.Entities return new ItemResolveArgs(ConfigurationManager.ApplicationPaths); } + var isDirectory = false; + if (UseParentPathToCreateResolveArgs) { path = System.IO.Path.GetDirectoryName(path); + isDirectory = true; } - pathInfo = pathInfo ?? FileSystem.GetFileSystemInfo(path); + pathInfo = pathInfo ?? (isDirectory ? new DirectoryInfo(path) : FileSystem.GetFileSystemInfo(path)); if (pathInfo == null || !pathInfo.Exists) { |
