aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-05 14:23:41 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-07-05 14:23:41 -0400
commitdeeb85f2962fdcfaf56e4e2e7f72aac8acb6efc3 (patch)
tree26dd386f46592f1ca9cb320fec4d83b69b8dd8bb /MediaBrowser.Controller/Entities/BaseItem.cs
parent6b84095adda46ed430c4552590d00d5841d953cc (diff)
don't try to get non-cached children when offline
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs10
1 files changed, 9 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index dff0203b9..0104db305 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -314,7 +314,15 @@ namespace MediaBrowser.Controller.Entities
isDirectory = true;
}
- pathInfo = pathInfo ?? (isDirectory ? new DirectoryInfo(path) : FileSystem.GetFileSystemInfo(path));
+ try
+ {
+ pathInfo = pathInfo ?? (isDirectory ? new DirectoryInfo(path) : FileSystem.GetFileSystemInfo(path));
+ }
+ catch (IOException)
+ {
+ IsOffline = true;
+ throw;
+ }
if (pathInfo == null || !pathInfo.Exists)
{