diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-05 14:23:41 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-07-05 14:23:41 -0400 |
| commit | deeb85f2962fdcfaf56e4e2e7f72aac8acb6efc3 (patch) | |
| tree | 26dd386f46592f1ca9cb320fec4d83b69b8dd8bb /MediaBrowser.Controller/Entities/BaseItem.cs | |
| parent | 6b84095adda46ed430c4552590d00d5841d953cc (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.cs | 10 |
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) { |
