I'm working on a personal project that I was trying to solve via canonicalizing a relative path in Rust. However, whenever I do so, the new path gets prefixed with a strange \\?\
sequence. For example, something as simple as:
let p = fs::canonicalize(".").unwrap();
println!("{}", p.display());
will result in something like the following output:
\\?\C:\Users\[...]\rustprojects\projectname
This isn't a particular problem because I can accomplish what I'm attempting in other ways. However, it seems like odd behavior, especially if you are going to use the string form of the path in some way that requires accuracy. Why is this sequence of characters prepending the result, and how can I avoid it?