-
Notifications
You must be signed in to change notification settings - Fork 8
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
verbatim path prefix not normalized correctly #6
Comments
I tried following code on Windows use std::path::Path;
fn main() {
let p = Path::new(r#"\\?\C:\Users\andrew\foo"#);
for c in p.components() {
println!("{:?}", c);
}
} The output was
Since slash path is a path where |
Me neither =) I just do a lot of work with Windows paths for work. Unix is so much simpler. I'm not an expert at all, but here is an example program to test if Windows can actually access certain file path formats:
Output:
|
The Windows documentation on verbatim / extended-length path prefixes says:
When it says So my thought is that since the official docs say unix-style paths are not valid with |
Actually, thinking this through some more, Rust thought I guess the main thing I'm wondering for |
Just stumble at this when looking for The UNC is discuss in a rust github issue rust-lang/rust#42869 They are working on making a 'friendly' The workaround I use is simply use dunce. You could, for instance, use the funcs from that crate and then apply |
On Windows, calling
path.to_slash()
on a verbatim path like:produces:
when it should produce:
The text was updated successfully, but these errors were encountered: