aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Providers/DirectoryService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Providers/DirectoryService.cs')
-rw-r--r--MediaBrowser.Controller/Providers/DirectoryService.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs
index 3d1af2afa..6d220f3a3 100644
--- a/MediaBrowser.Controller/Providers/DirectoryService.cs
+++ b/MediaBrowser.Controller/Providers/DirectoryService.cs
@@ -120,10 +120,14 @@ namespace MediaBrowser.Controller.Providers
{
file = _fileSystem.GetFileInfo(path);
- if (file != null)
+ if (file != null && file.Exists)
{
_fileCache.TryAdd(path, file);
}
+ else
+ {
+ return null;
+ }
}
return file;