From deeb85f2962fdcfaf56e4e2e7f72aac8acb6efc3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 5 Jul 2013 14:23:41 -0400 Subject: don't try to get non-cached children when offline --- MediaBrowser.Controller/Entities/BaseItem.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs') 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) { -- cgit v1.2.3