-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segments that are just a drive letter are dropped on Windows #37
Comments
Windows paths like According to this Raymond Chen article, I see three possibilities:
I lean towards option 2. I don't like the performance characteristics of option 1 (or the fact that the subprocess spawn could hypothetically flake), and I don't like even the marginal possibility of incorrectness in option 3. @munificent I'd appreciate your thoughts on this. |
I decided to try this out on dotnetfiddle, figuring .NET might be a good thing to copy since it came from MS... However: Console.WriteLine(Path.Combine("C:", "\\test\\test"));
Console.WriteLine(Path.Combine("C:", "test\\test"));
Console.WriteLine(Path.Combine("X:", "\\test\\test"));
Console.WriteLine(Path.Combine("X:", "test\\test")); Outputs:
So actually it's not doing what I'd want anyway. In my original example I had So, probably the fix isn't going to be usable with |
I think the right interpretation is that |
Yeah, I think that makes sense. I (incorrectly) assumed they would both be in a nice format to use in path.join's etc., but these things are probably as old as me! 😀 |
@munificent In practice, it seems that listing a string like |
Hello, do you consider fixing this issue? |
Please, disregard. I just saw that it is working as expected in 1.8.0-nullsafety.1. |
On Windows, the following code:
Outputs the following:
The value of
HOMEDRIVE
is something that's provided by Windows (without a trailing slash) and is often joined withHOMEPATH
so maybe it makes sense to support it here.The text was updated successfully, but these errors were encountered: