You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is an edge case of #4820. Specifically, path_open discards trailing slashes when path_open is creating a new file. This is a bug because trailing slash is semantically meaningful. Other runtimes like WasmEdge, Wazero, WAMR, Wasmtime, and Node correctly preserves the trailing slash.
Steps to reproduce
This test case can be added to tests/wasi-fyi/fs_open_trailing_slash.rs
let errno = path_open(
fd,0,
path_bad_new_file.as_ptr()asi32,
path_bad_new_file.len()asi32,OFLAGS_CREAT,RIGHTS_FD_READ | RIGHTS_FD_WRITE,0,0,1024,);assert_eq!(
errno,ERRNO_ISDIR,"creating a regular file with a trailing slash should fail");
Expected behavior
path_open should error with isdir.
The text was updated successfully, but these errors were encountered:
Describe the bug
This issue is an edge case of #4820. Specifically,
path_open
discards trailing slashes whenpath_open
is creating a new file. This is a bug because trailing slash is semantically meaningful. Other runtimes like WasmEdge, Wazero, WAMR, Wasmtime, and Node correctly preserves the trailing slash.Steps to reproduce
This test case can be added to
tests/wasi-fyi/fs_open_trailing_slash.rs
Expected behavior
path_open
should error withisdir
.The text was updated successfully, but these errors were encountered: