-
-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
Both these snippets should fail with notdir because the path contains a trailing slash. This behavior is consistent among Linux host, Wasmtime, WAMR, WasmEdge. Node however, successfully opens the file.
#include <fcntl.h>
#include <stdio.h>
int main() {
int fd = open("file/", O_RDONLY);
if (fd < 0) {
perror("open");
return 1;
}
return 0;
}fn main() {
unsafe {
let base_fd = 3;
let fd = wasi::path_open(base_fd, 0, "file/", 0, wasi::RIGHTS_FD_READ, 0, 0).unwrap();
eprintln!("fd {fd}");
}
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels