-
Notifications
You must be signed in to change notification settings - Fork 1.6k
filesystem: ErrorCode::IsDirectory when opening directory with WRITE #12136
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
filesystem: ErrorCode::IsDirectory when opening directory with WRITE #12136
Conversation
|
In all honesty I haven't tested on Windows, it's just that this patch should fix the issue. To repro, check out the |
2e830ac to
6cd0e89
Compare
|
Rebased to fix the rustfmt error |
On Windows, it was possible to return a directory descriptor if READ wasn't in the permissions. Fixes wasmtime for WebAssembly/wasi-testsuite#176.
6cd0e89 to
a7831bf
Compare
|
My goodness, there are many CI checks in this project :) Patch fixes unused-variable warning/error when compiling for Windows. |
You can add |
|
Test-wise this is something that'll be caught when updating to the latest wasi-testsuite, right? If so, I think it's ok to skip a test here. Mind leaving a comment though on this match arm explaining that this is sync'ing windows semantics to unix semantics? |
I had misremembered the nature of this incompatibility. Fixed (hopefully) with a reference to POSIX. prtest:full
|
I had misremembered the nature of this error, my apologies. The problem is not the lack of READ, it's the presence of WRITE; see the |
prtest:full
path_open_preopen is now working on Windows.
prtest:full
c62ec38 to
a010fbe
Compare
|
Lordie me, this PR has been an education for me, thanks all for patience. Ready now (again). |
|
Anything in particular we could make easier on our end? Or more of a "lots of stuff to discover" kind of education? |
Oh, I think things are pretty good on the wasmtime side, just that there were a number of considerations that I didn't fully grasp (the history of wasi versions and their implementations, the layers of error codes (std::io vs ErrorCode etc), the specificities of how CI works here...). So things are good. Marginal improvements can be made tho:
But like I say things are good, and thank you and Roman for your help & patience <3
|

On Windows, it was possible to return a directory descriptor even if WRITE was in the permissions. Fixes wasmtime for
WebAssembly/wasi-testsuite#176.