aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations')
-rw-r--r--Emby.Server.Implementations/IO/ManagedFileSystem.cs13
-rw-r--r--Emby.Server.Implementations/Localization/Core/sw.json1
2 files changed, 12 insertions, 2 deletions
diff --git a/Emby.Server.Implementations/IO/ManagedFileSystem.cs b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
index fad97344b..4d68cb444 100644
--- a/Emby.Server.Implementations/IO/ManagedFileSystem.cs
+++ b/Emby.Server.Implementations/IO/ManagedFileSystem.cs
@@ -497,8 +497,17 @@ namespace Emby.Server.Implementations.IO
/// <inheritdoc />
public virtual bool AreEqual(string path1, string path2)
{
- return Path.TrimEndingDirectorySeparator(path1).Equals(
- Path.TrimEndingDirectorySeparator(path2),
+ if (string.IsNullOrWhiteSpace(path1) || string.IsNullOrWhiteSpace(path2))
+ {
+ return false;
+ }
+
+ var normalized1 = Path.TrimEndingDirectorySeparator(path1);
+ var normalized2 = Path.TrimEndingDirectorySeparator(path2);
+
+ return string.Equals(
+ normalized1,
+ normalized2,
_isEnvironmentCaseInsensitive ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
}
diff --git a/Emby.Server.Implementations/Localization/Core/sw.json b/Emby.Server.Implementations/Localization/Core/sw.json
new file mode 100644
index 000000000..0967ef424
--- /dev/null
+++ b/Emby.Server.Implementations/Localization/Core/sw.json
@@ -0,0 +1 @@
+{}