On Windows, ignore files for which full_metadata
fails.
#2884
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,
metadata
computes only partial metadata results, which don'tinclude what WASI needs for the
inode
field inreaddir
results. cap-stdhas a
full_metadata
function which is able to include this extrainformation, 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 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.