-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Added another error to be processed in fallback #107985
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
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @thomcc (or someone else) soon. Please see the contribution instructions for more information. |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@ChrisDenton hey I've made this PR per your suggestion, works like a charm! Let me know if anything else should be done (or done better). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me. Could you update the comment below to briefly mention ERROR_ACCESS_DENIED
is returned by files/directories that exist but are inaccessible (and maybe mention "System Volume Information" as an example)?
I've expanded the comment, thanks for your input. |
@alesito85 did you push your changes? I'm not yet seeing them. |
@ChrisDenton the changes are in now. |
Thanks, comment looks good. The only thing I'd ask is to squish the two commits into one, seeing as they're both small. |
Added another error to be processed in fallback Solution suggested by Chris Denton nushell/nushell#6857 (comment)
@ChrisDenton done. |
Thanks for contributing to Rust! Let's try to get this merged. @bors r+ rollup If all the tests go well then this should be in nightly soon and released in Rust 1.69. |
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#107902 (fix: improve the suggestion on future not awaited) - rust-lang#107913 (Update broken link in cargo style guide) - rust-lang#107942 (Tighter spans for bad inherent `impl` self types) - rust-lang#107948 (Allow shortcuts to directories to be used for ./x.py fmt) - rust-lang#107971 (Clearly document intentional UB in mir-opt tests) - rust-lang#107985 (Added another error to be processed in fallback) - rust-lang#108002 (Update books) - rust-lang#108013 (rustdoc: use a string with one-character codes for search index types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This pull request addresses the problem of Rust not being able to read file/directory metadata because the current user doesn't have permission to read the file and are thus inaccessible.
One particular example is
System Volume Information
. But any example can be made by having a file/directory, which the current user can't access even though the system does allow to view the metadata, which is handled by the fallback.The fallback exists to get the metadata but it was limited to one error type. Having added ERROR_ACCESS_DENIED per Chris Denton's suggestion, file/directory properties are now properly read.
Solution suggested by Chris Denton nushell/nushell#6857 (comment)