From 6150129f50e2fb2057af9848df442d5a38798be1 Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Wed, 24 Aug 2022 21:26:15 +0100 Subject: [PATCH] wasi open dir --- lapce-proxy/src/plugin/wasi.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lapce-proxy/src/plugin/wasi.rs b/lapce-proxy/src/plugin/wasi.rs index 2774d1f8..d2d2ded5 100644 --- a/lapce-proxy/src/plugin/wasi.rs +++ b/lapce-proxy/src/plugin/wasi.rs @@ -333,10 +333,10 @@ pub fn start_volt( stderr.clone(), ))) .preopened_dir( - wasmtime_wasi::Dir::from_std_file(std::fs::File::open( - volt_path.join("volt.toml"), - )?) - .open_parent_dir(wasmtime_wasi::ambient_authority())?, + wasmtime_wasi::Dir::open_ambient_dir( + volt_path, + wasmtime_wasi::ambient_authority(), + )?, "/", )? .build();