relative-path icon indicating copy to clipboard operation
relative-path copied to clipboard

Add `to_path_normalized`

Open matklad opened this issue 5 years ago • 1 comments

I have a ../foo RelativePathBuf and a /bar std::PathBuf. I'd like to be able to get /foo out of it, without calling Path::canonicalize (which is a failable syscall). Perhaps adding a to_path_normalized with this semantics would work?

matklad avatar Aug 28 '18 14:08 matklad

Mentoring notes:

This would require implementing a version of relative_traversal that works with a mix of path::Component and relative_path::Component over a PathBuf instance.

Anyone who is interested in normalization might also want to go and shout in rust-lang/rust#47402 since that would supersede the need to do it in this crate.

udoprog avatar Aug 28 '18 14:08 udoprog