improve handling of disconnected drives

This commit is contained in:
Luke Pulverenti 2017-08-23 14:00:42 -04:00
parent 2d0c98733a
commit 26f6f594ce

View File

@ -648,15 +648,15 @@ namespace MediaBrowser.Controller.Entities
public static bool IsPathOffline(string path, List<string> allLibraryPaths) public static bool IsPathOffline(string path, List<string> allLibraryPaths)
{ {
if (FileSystem.FileExists(path)) //if (FileSystem.FileExists(path))
{ //{
return false; // return false;
} //}
var originalPath = path; var originalPath = path;
// Depending on whether the path is local or unc, it may return either null or '\' at the top // Depending on whether the path is local or unc, it may return either null or '\' at the top
while (!string.IsNullOrEmpty(path) && path.Length > 1) while (!string.IsNullOrWhiteSpace(path) && path.Length > 1)
{ {
if (FileSystem.DirectoryExists(path)) if (FileSystem.DirectoryExists(path))
{ {