aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs')
-rw-r--r--MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs18
1 files changed, 10 insertions, 8 deletions
diff --git a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs
index 131dea36e..68df0e52a 100644
--- a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs
+++ b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs
@@ -398,14 +398,16 @@ namespace MediaBrowser.Common.Implementations.IO
throw new ArgumentNullException("path");
}
- //if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) != -1 &&
- // !path.StartsWith("file://", StringComparison.OrdinalIgnoreCase))
- //{
- // return false;
- //}
- //return true;
-
- return Path.IsPathRooted(path);
+ // Cannot use Path.IsPathRooted because it returns false under mono when using windows-based paths, e.g. C:\\
+
+ if (path.IndexOf("://", StringComparison.OrdinalIgnoreCase) != -1 &&
+ !path.StartsWith("file://", StringComparison.OrdinalIgnoreCase))
+ {
+ return false;
+ }
+ return true;
+
+ //return Path.IsPathRooted(path);
}
}
}