Closed
Description
Description
When working with GetFullPath(string, string)
and a drive relative scenario, I noticed that the method returns different results depending on the capitalization of the dirve letter.
I was wondering why the check is implemented using ordinal (case sensitive) comparison when I was actually expecting it to be case insensitive.
Looking through the original PR comments dotnet/coreclr#15579 did not help (unless I overread something).
Reproduction Steps
var basePath = "c:/a/b/c/";
var relativePath = "c:test";
var sameButDifferent = "C:test";
Console.WriteLine(Path.GetFullPath(relativePath, basePath));
Console.WriteLine(Path.GetFullPath(sameButDifferent, basePath));
Outputs
c:\a\b\c\test
C:\test
Expected behavior
I expected the the path's root is checked case insensitive
Actual behavior
the path's root is checked case sensitive
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response