-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Make os::make_absolute logic available for arbitrary Paths #5003
Comments
The current path joining logic is also broken for Windows. I started work on this in a separate pull request: #5023 |
You probably have a much better idea of the scope of this than I do. How much of this is left to be done after your pull request? |
I think path needs to be reworked a bit to do more than just filesystems, but I'm not sure how abstract it can get and not be useless. |
clearing milestone - won't break backwards-compatibility |
My Path rewrite provides |
The path stuff just landed in 40180cd. A relative-path-checking variant of |
Visiting for triage.
|
cc #16507 |
@alexcrichton how did this turn out with the Path RFC? |
We've removed |
Why does Like said @mitsuhiko, the current |
Normalization for paths is motioned in #22500. However there seems to be nothing about unsafe join. |
This function ended up being removed, so I'm going to close this in favor of a to-be-opened RFC issue to include this functionality. |
Rustup to rust-lang#67886 changelog: none
Especially in web applications (or other apps that do not use the current working directory of the operating system) it would be useful to be able to use make_absolute against an arbitrary path. In Python that's provided by
os.path.join
. Unfortunately that also comes with negative security aspects (if the right hand side is absolute).I would propose a
Path::unsafe_join
function that works like the Python one. As an extension it would also make sense to further improve how joining works for Windows.Example implementation: https://gist.github.com/mitsuhiko/4974499
The text was updated successfully, but these errors were encountered: