aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/PathExtensions.cs
diff options
context:
space:
mode:
authorAmbulantRex <21176662+AmbulantRex@users.noreply.github.com>2023-04-01 05:03:55 -0600
committerAmbulantRex <21176662+AmbulantRex@users.noreply.github.com>2023-04-01 05:03:55 -0600
commit3a731051adf6d636517e5a9babbbe9f9da7d520b (patch)
tree06b2435b9d1447c78f5d28f5a0d933f48277a091 /Emby.Server.Implementations/Library/PathExtensions.cs
parenta944352aa8b961ab723fed2d66947c19129a11cc (diff)
Correct styling inconsistencies
Diffstat (limited to 'Emby.Server.Implementations/Library/PathExtensions.cs')
-rw-r--r--Emby.Server.Implementations/Library/PathExtensions.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs
index 62a9e6419..c4b6b3756 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
/// <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>