WASI checking real system file system rather than vfs #2745
Labels
bug
Something isn't working
📦 lib-vfs
About wasmer-vfs
📦 lib-wasi
About wasmer-wasi
priority-medium
Medium priority issue
Milestone
Describe the bug
It's hard to reproduce without setting up an environment for it however just reading the code the bug is hopefully easy to confirm.
At these lines:
wasmer/lib/wasi/src/syscalls/mod.rs
Line 1417 in a9da483
wasmer/lib/wasi/src/syscalls/mod.rs
Line 1419 in a9da483
wasmer/lib/wasi/src/syscalls/mod.rs
Line 1786 in a9da483
wasmer/lib/wasi/src/syscalls/mod.rs
Line 1747 in a9da483
The code is checking for things like the existence of files and directories and their type however its doing it in the real file system rather than virtual one because its using the Path helper functions which are in a standard crate.
Expected behavior
Should be using the VFS file system calls rather than using the helper functions of Path which are not connected to the VFS.
Over here is a working version...
john-sharratt@5a7407b
Additional context
Ill patch it in my second merge request that's waiting for the first merge request to merge - if you fix the bug before the other merge request I'll remove it again.
Cheers
The text was updated successfully, but these errors were encountered: