-
Notifications
You must be signed in to change notification settings - Fork 42
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
feature request: Implement both path_remove_directory
and path_unlink_file
#49
Comments
path_remove_directory
and path_unlink_file
path_remove_directory
and path_unlink_file
Correct. Currently we entirely ignore permissions except at the location you mentioned. #42 has an implementation of this, but I need to look further into how exactly wasi's rights system works to check if the implementation is correct.
Weird. |
I will take a look tomorrow. |
Feature Request
We are implementing 2 of the syscalls that deal with removing files and empty directories.
browser_wasi_shim/src/fd.ts
Lines 99 to 101 in 7349f7d
browser_wasi_shim/src/fd.ts
Lines 108 to 110 in 7349f7d
https://wasix.org/docs/api-reference/wasi/path_unlink_file
https://wasix.org/docs/api-reference/wasi/path_remove_directory
Status
We have implemented both and it seems to work for empty file and empty directory.
The code is based on https://github.com/bjorn3/browser_wasi_shim/pull/42/files#diff-177a21b9f40c72ea679cf8658d14ed0d9702afcea694e92e0936f11ab182d2a3R331-R333
with some additional checks.
Challenges
unlinkat
to unlink the files and remove the empty directories. This goes into an infinite loop.browser_wasi_shim/src/wasi_defs.ts
Line 116 in 7349f7d
other than
browser_wasi_shim/src/fs_fd.ts
Lines 290 to 291 in 7349f7d
The text was updated successfully, but these errors were encountered: