-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Figure out final solution for volume-relative windows paths #11856
Comments
Volume-relative paths make a lot of things more complicated. And notably, it means |
I want to bump this a bit because I think this is security related. Currently the
Different working directories on different drives is a concept long gone. The only software that still has this is The reason the current behavior is dangerous because you can end up trusting |
@aturon @alexcrichton how did this fall out with path reform? |
This issue isn't done yet, because we still need to implement a way to turn volume relative paths into true absolute paths. This means getting the current working directory for that drive and joining the paths. While At first I thought we were doomed because |
@retep998 Would you be interested in taking this project on? |
@aturon Sure. Just point me at what functions need doing and I'll do them. |
Has anything happened here? (@aturon?) |
There was a PR to turn relative paths and absolute paths into verbatim paths. #27916 |
[`missing_asserts_for_indexing`]: work with bodies instead of blocks separately Fixes rust-lang#11856 Before this change, this lint would check blocks independently of each other, which means that it misses `assert!()`s from parent blocks. ```rs // check_block assert!(x.len() > 1); { // check_block // no assert here let _ = x[0] + x[1]; } ``` This PR changes it to work with bodies rather than individual blocks. That means that a function will be checked in one go and we can remember if an `assert!` occurred anywhere. Eventually it would be nice to have a more control flow-aware analysis, possibly by rewriting it as a MIR lint, but that's more complicated and I wanted this fixed first. changelog: [`missing_asserts_for_indexing`]: accept `assert!`s from parent blocks
As extensively documented in #11579, volume-relative paths on Windows are a relic of the past. We either need to remove support for it, or we need to figure out how
ls
, etc running in cmd.exe are emulating volume-relative cwds and teachgetcwd()
about that.If we remove support for volume-relative paths, we should probably not make it a condition, because that's pretty crappy. We may want to just treat it as a path without a prefix.
The text was updated successfully, but these errors were encountered: