diff --git a/src/DefaultBuilder/src/HostingPathResolver.cs b/src/DefaultBuilder/src/HostingPathResolver.cs index 68809b59ade6..e8729a772eb6 100644 --- a/src/DefaultBuilder/src/HostingPathResolver.cs +++ b/src/DefaultBuilder/src/HostingPathResolver.cs @@ -6,15 +6,15 @@ namespace Microsoft.AspNetCore; internal static class HostingPathResolver { public static string ResolvePath(string? contentRootPath) => - PathWithDirectorySeperatorAtEnd(ResolvePathNonCononical(contentRootPath, AppContext.BaseDirectory)); + PathWithDirectorySeparatorAtEnd(ResolvePathNonCanonical(contentRootPath, AppContext.BaseDirectory)); public static string ResolvePath(string? contentRootPath, string basePath) => - PathWithDirectorySeperatorAtEnd(ResolvePathNonCononical(contentRootPath, basePath)); + PathWithDirectorySeparatorAtEnd(ResolvePathNonCanonical(contentRootPath, basePath)); - private static string PathWithDirectorySeperatorAtEnd(string path) => + private static string PathWithDirectorySeparatorAtEnd(string path) => Path.EndsInDirectorySeparator(path) ? path : path + Path.DirectorySeparatorChar; - private static string ResolvePathNonCononical(string? contentRootPath, string basePath) + private static string ResolvePathNonCanonical(string? contentRootPath, string basePath) { if (string.IsNullOrEmpty(contentRootPath)) {