-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
std::path::Path prefix parsing in Windows is inconsistent with other OS's #100833
Comments
This is intentional. In this case the path |
@rustbot label +O-windows +A-io |
I think it is incorrect to parse a POSIX path into a Win32 path. A path should be parsed as UNC only if it starts with |
There is no difference, as pointed out above Windows will accept either It's fairly easy to see, for instance in [1] The exception is paths that begin with exactly |
Is there any way to force POSIX path parsing or disable UNC parsing? |
Disabling UNC parsing wouldn't make sense, even if it were possible it's still a Windows path so |
@ncihnegn @ChrisDenton I just published typed-path as a means to partially solve this problem by providing |
Great! I'm closing this issue in favour of #66621 or using a crate. |
Prepend `c:` so that it won't be treated as UNC path. See rust-lang/rust#100833 for more.
Prepend `c:` so that it won't be treated as UNC path. See rust-lang/rust#100833 for more. (cherry picked from commit 7025986)
I tried this code:
I expected to see this happen:
Instead, this happened:
The text was updated successfully, but these errors were encountered: