aboutsummaryrefslogtreecommitdiff
path: root/Emby.Common.Implementations/IO/ManagedFileSystem.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2017-01-11 12:58:44 -0500
committerGitHub <noreply@github.com>2017-01-11 12:58:44 -0500
commitfb31918f9cea1cd13d9aa8c7468f961cc4f43833 (patch)
tree0a3d696a0e32ff4b646d899912f2b6ffe9ea4807 /Emby.Common.Implementations/IO/ManagedFileSystem.cs
parentcce6484b6c52b37609d09fb5112ff04b166fab72 (diff)
parent0b5d4ce3f839118a0a5903ec278321ecfecf1c32 (diff)
Merge pull request #2392 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Common.Implementations/IO/ManagedFileSystem.cs')
-rw-r--r--Emby.Common.Implementations/IO/ManagedFileSystem.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
index 78070a5d9..72b9d55eb 100644
--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs
@@ -499,6 +499,24 @@ namespace Emby.Common.Implementations.IO
CopyFile(temp1, file2, true);
}
+ public bool AreEqual(string path1, string path2)
+ {
+ if (path1 == null && path2 == null)
+ {
+ return true;
+ }
+
+ if (path1 == null || path2 == null)
+ {
+ return false;
+ }
+
+ path1 = path1.TrimEnd(DirectorySeparatorChar);
+ path2 = path2.TrimEnd(DirectorySeparatorChar);
+
+ return string.Equals(path1, path2, StringComparison.OrdinalIgnoreCase);
+ }
+
public bool ContainsSubPath(string parentPath, string path)
{
if (string.IsNullOrEmpty(parentPath))