From 715119b525a026f0f60c9dcaae1d4899cbc6bcda Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 17 May 2014 14:37:40 -0400 Subject: updated nuget --- .../IO/CommonFileSystem.cs | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs') diff --git a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs index 24ac48e83..014fd6f82 100644 --- a/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs +++ b/MediaBrowser.Common.Implementations/IO/CommonFileSystem.cs @@ -351,18 +351,21 @@ namespace MediaBrowser.Common.Implementations.IO throw new ArgumentNullException("to"); } - path = path.Replace(from, to, StringComparison.OrdinalIgnoreCase); + var newPath = path.Replace(from, to, StringComparison.OrdinalIgnoreCase); - if (to.IndexOf('/') != -1) + if (!string.Equals(newPath, path)) { - path = path.Replace('\\', '/'); - } - else - { - path = path.Replace('/', '\\'); + if (to.IndexOf('/') != -1) + { + newPath = path.Replace('\\', '/'); + } + else + { + newPath = path.Replace('/', '\\'); + } } - return path; + return newPath; } } } -- cgit v1.2.3