The Free Software Media System - Server Backend & API
use StringBuilder in GetValidFilename
Luke Pulverenti1496991096c4
diff --git a/MediaBrowser.Controller/IO/FileSystem.cs b/MediaBrowser.Controller/IO/FileSystem.csindex e5f80533aa..3d425f13f0 100644--- a/MediaBrowser.Controller/IO/FileSystem.cs+++ b/MediaBrowser.Controller/IO/FileSystem.cs@@ -106,13 +106,15 @@ namespace MediaBrowser.Controller.IO{throw new ArgumentNullException("filename");}++ var builder = new StringBuilder(filename);foreach (var c in InvalidFileNameChars){- filename = filename.Replace(c, SpaceChar);+ builder = builder.Replace(c, SpaceChar);}- return filename;+ return builder.ToString();}/// <summary>