nodejs / uvwasi

WASI syscall API built atop libuv
MIT License
222 stars 48 forks source link

Preserve trailing slash in file path where it makes sense #268

Closed yagehu closed 1 month ago

yagehu commented 1 month ago

This commit fixes the behavior of path_open such that if the path contains trailing slashes and the target file is not a directory, the call errors. This behavior is consistent with Linux host, Wasmtime, WAMR, and WasmEdge.

fixes #267

guybedford commented 1 month ago

It would be good to align with implementations on these errors, and given the current architecture handling it in the path normalization seems a good way to go about it.