Correct styling inconsistencies

This commit is contained in:
AmbulantRex 2023-04-01 05:03:55 -06:00
parent a944352aa8
commit 3a731051ad
1 changed files with 3 additions and 3 deletions

View File

@ -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
/// <returns>The fully expanded, normalized path.</returns>
public static string Canonicalize(this string path)
{
return Path.GetFullPath(path).NormalizePath()!;
return Path.GetFullPath(path).NormalizePath();
}
/// <summary>
@ -161,7 +161,7 @@ namespace Emby.Server.Implementations.Library
separator = newSeparator;
return path?.NormalizePath(newSeparator);
return path.NormalizePath(newSeparator);
}
/// <summary>