fix: always set directory open flag in open_ambient_dir#276
Merged
sunfishcode merged 1 commit intobytecodealliance:mainfrom Sep 29, 2022
Merged
fix: always set directory open flag in open_ambient_dir#276sunfishcode merged 1 commit intobytecodealliance:mainfrom
directory open flag in open_ambient_dir#276sunfishcode merged 1 commit intobytecodealliance:mainfrom
Conversation
Member
Author
|
CI failures seem unrelated: |
sunfishcode
reviewed
Sep 27, 2022
Member
|
The |
Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
a93b620 to
0ad9a64
Compare
Member
Author
|
@sunfishcode updated, PTAL |
Member
|
Thanks! |
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.
Note, that this is the only way to actually acquire a directory from
AmbientAuthoritywhen running in Wasmtime.Fix for that is in-progress at bytecodealliance/wasmtime#4947
All this should do is fail if the FD is not a directory. Currently Wasmtime Snapshot 1 implementation incorrectly uses this bit value to determine whether to open the FD in "file mode" or "directory mode". Setting this bit is a workaround for that issue, but it's also just generally a good thing to do.