From 3a731051adf6d636517e5a9babbbe9f9da7d520b Mon Sep 17 00:00:00 2001 From: AmbulantRex <21176662+AmbulantRex@users.noreply.github.com> Date: Sat, 1 Apr 2023 05:03:55 -0600 Subject: [PATCH] Correct styling inconsistencies --- Emby.Server.Implementations/Library/PathExtensions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs index 62a9e6419e..c4b6b37561 100644 --- a/Emby.Server.Implementations/Library/PathExtensions.cs +++ b/Emby.Server.Implementations/Library/PathExtensions.cs @@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.Library return false; } - var newSubPathTrimmed = newSubPath.AsSpan().TrimEnd((char)newDirectorySeparatorChar!); + var newSubPathTrimmed = newSubPath.AsSpan().TrimEnd(newDirectorySeparatorChar); // Ensure that the path with the old subpath removed starts with a leading dir separator int idx = oldSubPathEndsWithSeparator ? subPath.Length - 1 : subPath.Length; newPath = string.Concat(newSubPathTrimmed, path.AsSpan(idx)); @@ -120,7 +120,7 @@ namespace Emby.Server.Implementations.Library /// The fully expanded, normalized path. public static string Canonicalize(this string path) { - return Path.GetFullPath(path).NormalizePath()!; + return Path.GetFullPath(path).NormalizePath(); } /// @@ -161,7 +161,7 @@ namespace Emby.Server.Implementations.Library separator = newSeparator; - return path?.NormalizePath(newSeparator); + return path.NormalizePath(newSeparator); } ///