According to this test, it seems that using fd_seek on a directory is forbidden, though I can call lseek on a directory fd in POSIX. Also, we shouldn't set the fd_seek bits on a directory despite explicitly setting it in path_open.
I can't find any document or discussion related to this behavior which is unsetting the rights that are explicitly set in path_open for the directory.
My question is:
- I'm wondering whether unsetting the rights is a good choice compare to returning
ISDIR error while using the function.
- Which right should be disabled if the file is a directory?
I believe this should be documented.
It seems that the rights system may be removed. Getting a workaround to pass the test is what I intended to do.
A related issue in wasi-filesystem: WebAssembly/WASI#746
Thanks in advance!
According to this test, it seems that using
fd_seekon a directory is forbidden, though I can calllseekon a directory fd in POSIX. Also, we shouldn't set the fd_seek bits on a directory despite explicitly setting it inpath_open.I can't find any document or discussion related to this behavior which is unsetting the rights that are explicitly set in
path_openfor the directory.My question is:
ISDIRerror while using the function.I believe this should be documented.
It seems that the rights system may be removed. Getting a workaround to pass the test is what I intended to do.
A related issue in wasi-filesystem: WebAssembly/WASI#746
Thanks in advance!