aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/DirectoryService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-08-06 10:09:03 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-08-06 10:09:03 -0400
commitc3d8115bc8aa37fe0fae60b05c5f273d06627b8e (patch)
treeedbddbfccefbc0935040d6713ef17f19ec428cea /MediaBrowser.Controller/Providers/DirectoryService.cs
parent24003580e7977b5336661921f55a919a62a3194f (diff)
update directory service
Diffstat (limited to 'MediaBrowser.Controller/Providers/DirectoryService.cs')
-rw-r--r--MediaBrowser.Controller/Providers/DirectoryService.cs45
1 files changed, 23 insertions, 22 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 62d424696..ca9038439 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -100,28 +100,29 @@ namespace MediaBrowser.Controller.Providers
public FileSystemMetadata GetFile(string path)
{
- var directory = Path.GetDirectoryName(path);
-
- if (string.IsNullOrWhiteSpace(directory))
- {
- _logger.Debug("Parent path is null for {0}", path);
- return null;
- }
-
- try
- {
- var dict = GetFileSystemDictionary(directory, false);
-
- FileSystemMetadata entry;
- dict.TryGetValue(path, out entry);
-
- return entry;
- }
- catch (Exception ex)
- {
- _logger.ErrorException("Error in GetFileSystemDictionary. Directory: :{0}. Original path: {1}", ex, directory, path);
- return null;
- }
+ return _fileSystem.GetFileInfo(path);
+ //var directory = Path.GetDirectoryName(path);
+
+ //if (string.IsNullOrWhiteSpace(directory))
+ //{
+ // _logger.Debug("Parent path is null for {0}", path);
+ // return null;
+ //}
+
+ //try
+ //{
+ // var dict = GetFileSystemDictionary(directory, false);
+
+ // FileSystemMetadata entry;
+ // dict.TryGetValue(path, out entry);
+
+ // return entry;
+ //}
+ //catch (Exception ex)
+ //{
+ // _logger.ErrorException("Error in GetFileSystemDictionary. Directory: :{0}. Original path: {1}", ex, directory, path);
+ // return null;
+ //}
}
public IEnumerable<FileSystemMetadata> GetDirectories(string path)