A crate to handle Windows' "exotic" paths #34
Description
Std path does some weird things with UNC paths (\\?\
). For one std::fs::canonicalize always returns one whether it is needed or not. Then path.join
will just do a string concatenation leading to invalid paths. This leads to bugs in many important parts of the ecosystem. (Cargo, wasm-pack, Rustup)
So we need a library that provides a binding to GetFullPathNameW
on windows and uses std::fs::canonicalize
otherwize.
More ambitiously we need a path "interpreter" that "..
and .
while appending. So if you started with \\?\C:\bar
and joined ../foo
you would iterate the components of ../foo
and apply them to the base path, first applying ..
to get \\?\C:\
and then applying foo
to get \\?\C:\foo
."
Ether part of this would be a valuable addition to the ecosystem!