From 7882e5ad1e9ed5215998b2cdb4de989d55d925fa Mon Sep 17 00:00:00 2001 From: Alex Tan <8013458+senpai-notices@users.noreply.github.com> Date: Sun, 15 Oct 2023 02:59:07 +1100 Subject: [PATCH] Fix bug where `Parser.NormalizePath()` did not normalise `\` in Unix-based operating systems (#2312) --- API/Services/Tasks/Scanner/Parser/Parser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API/Services/Tasks/Scanner/Parser/Parser.cs b/API/Services/Tasks/Scanner/Parser/Parser.cs index 62c882901..30a2beddc 100644 --- a/API/Services/Tasks/Scanner/Parser/Parser.cs +++ b/API/Services/Tasks/Scanner/Parser/Parser.cs @@ -1043,7 +1043,7 @@ public static class Parser /// public static string NormalizePath(string? path) { - return string.IsNullOrEmpty(path) ? string.Empty : path.Replace(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) + return string.IsNullOrEmpty(path) ? string.Empty : path.Replace('\\', Path.AltDirectorySeparatorChar) .Replace(@"//", Path.AltDirectorySeparatorChar + string.Empty); }