The Free Software Media System - Server Backend & API
3.2.10.4
Luke Pulverenti4a8960fc8661
diff --git a/Emby.Common.Implementations/IO/ManagedFileSystem.cs b/Emby.Common.Implementations/IO/ManagedFileSystem.csindex d1903851f1..ba73c1ba27 100644--- a/Emby.Common.Implementations/IO/ManagedFileSystem.cs+++ b/Emby.Common.Implementations/IO/ManagedFileSystem.cs@@ -536,14 +536,14 @@ namespace Emby.Common.Implementations.IOCopyFile(temp1, file2, true);}- private char GetSeparatorChar(string path)+ private char GetDirectorySeparatorChar(string path){- if (path.IndexOf('/') != -1)+ if (_sharpCifsFileSystem.IsEnabledForPath(path)){- return '/';+ return _sharpCifsFileSystem.GetDirectorySeparatorChar(path);}- return '\\';+ return Path.DirectorySeparatorChar;}public bool AreEqual(string path1, string path2)@@ -558,8 +558,8 @@ namespace Emby.Common.Implementations.IOreturn false;}- path1 = path1.TrimEnd(GetSeparatorChar(path1));- path2 = path2.TrimEnd(GetSeparatorChar(path2));+ path1 = path1.TrimEnd(GetDirectorySeparatorChar(path1));+ path2 = path2.TrimEnd(GetDirectorySeparatorChar(path2));return string.Equals(path1, path2, StringComparison.OrdinalIgnoreCase);}@@ -576,7 +576,7 @@ namespace Emby.Common.Implementations.IOthrow new ArgumentNullException("path");}- var separatorChar = GetSeparatorChar(parentPath);+ var separatorChar = GetDirectorySeparatorChar(parentPath);return path.IndexOf(parentPath.TrimEnd(separatorChar) + separatorChar, StringComparison.OrdinalIgnoreCase) != -1;}@@ -610,7 +610,7 @@ namespace Emby.Common.Implementations.IOreturn path;}- return path.TrimEnd(GetSeparatorChar(path));+ return path.TrimEnd(GetDirectorySeparatorChar(path));}public string GetFileNameWithoutExtension(FileSystemMetadata info)diff --git a/Emby.Common.Implementations/IO/SharpCifsFileSystem.cs b/Emby.Common.Implementations/IO/SharpCifsFileSystem.csindex f2157b7af6..c1e429dc90 100644--- a/Emby.Common.Implementations/IO/SharpCifsFileSystem.cs+++ b/Emby.Common.Implementations/IO/SharpCifsFileSystem.cs@@ -30,6 +30,16 @@ namespace Emby.Common.Implementations.IOreturn path.StartsWith("smb://", StringComparison.OrdinalIgnoreCase) || IsUncPath(path);}+ public char GetDirectorySeparatorChar(string path)+ {+ if (path.IndexOf('/') != -1)+ {+ return '/';+ }++ return '\\';+ }+public FileSystemMetadata GetFileSystemInfo(string path){var file = CreateSmbFile(path);diff --git a/SharedVersion.cs b/SharedVersion.csindex 6f5bd9b1f7..6f3c5261fd 100644--- a/SharedVersion.cs+++ b/SharedVersion.cs@@ -1,3 +1,3 @@using System.Reflection;-[assembly: AssemblyVersion("3.2.10.3")]+[assembly: AssemblyVersion("3.2.10.4")]