Skip to content
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

Add to_path_normalized #3

Closed
matklad opened this issue Aug 28, 2018 · 2 comments
Closed

Add to_path_normalized #3

matklad opened this issue Aug 28, 2018 · 2 comments

Comments

@matklad
Copy link

matklad commented Aug 28, 2018

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?

@udoprog udoprog changed the title Add to_path_normlized Add to_path_normalized Aug 28, 2018
@udoprog
Copy link
Owner

udoprog commented Aug 28, 2018

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
Copy link
Owner

udoprog commented Aug 17, 2024

I think we already support this with RelativePath::normalize now.

@udoprog udoprog closed this as completed Aug 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants