On Windows, ignore files for which full_metadata fails.#2884
Merged
sunfishcode merged 1 commit intoMay 7, 2021
Merged
Conversation
Subscribe to Label Actioncc @kubkon DetailsThis issue or pull request has been labeled: "wasi"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
6eb50cc to
679c792
Compare
On Windows, `metadata` computes only partial metadata results, which don't include what WASI needs for the `inode` field in `readdir` results. cap-std has a `full_metadata` function which is able to include this extra information, however it has more strict access requirements, so it sometimes fails even when plain `metadata` would succeed. Make WASI's `readdir` silently skip over files that can't be accessed by `full_metadata`. These files wouldn't be openable in any other way by WASI programs, so the only benefit of listing them would be to let applications know that they exist. This allows it to avoid failing and avoid returning bogus results. This is part of a fix for bytecodealliance/cap-std#169.
679c792 to
6ba5e16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Windows,
metadatacomputes only partial metadata results, which don'tinclude what WASI needs for the
inodefield inreaddirresults. cap-stdhas a
full_metadatafunction which is able to include this extrainformation, however it has more strict access requirements, so it sometimes
fails even when plain
metadatawould succeed.Make WASI's
readdirsilently skip over files that can't be accessed byfull_metadata. These files wouldn't be openable in any other way byWASI programs, so the only benefit of listing them would be to
let applications know that they exist. This allows it to avoid failing
and avoid returning bogus results.
This is part of a fix for bytecodealliance/cap-std#169.