Skip to content

Commit

Permalink
Fix preopened directory mapping to virtual root
Browse files Browse the repository at this point in the history
This commit fixes the bug where preopening `.` causes the WASI runner to
map it to the virtual root, causing `path_open` to fail.

fixes wasmerio#4361
  • Loading branch information
yagehu committed Dec 18, 2023
1 parent 1abcd2c commit d7f6c10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wasix/src/runners/wasi_common.rs
Expand Up @@ -49,7 +49,7 @@ impl CommonWasiOptions {

if self.mapped_dirs.iter().all(|m| m.guest != ".") {
// The user hasn't mounted "." to anything, so let's map it to "/"
builder.add_map_dir(".", "/")?;
builder.add_map_dir(".", "/mnt/host")?;
}

builder.set_fs(Box::new(fs));
Expand Down

0 comments on commit d7f6c10

Please sign in to comment.