Backport pull request #9178 from jellyfin/release-10.8.z

Escape the path to pass as a command line argument

Original-merge: 09f1c7f535

Merged-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com>

Backported-by: crobibero <cody@robibe.ro>
This commit is contained in:
Róbert Örn Ketilsson
2023-03-09 19:29:39 -05:00
committed by crobibero
parent 6b0135d03b
commit ef3868ff50
4 changed files with 9 additions and 5 deletions

View File

@@ -56,7 +56,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
/// </summary>
/// <param name="path">The path.</param>
/// <returns>System.String.</returns>
private static string NormalizePath(string path)
public static string NormalizePath(string path)
{
// Quotes are valid path characters in linux and they need to be escaped here with a leading \
return path.Replace("\"", "\\\"", StringComparison.Ordinal);