From 0afc7e529ac2adfd7c6ca33a58eca476ad37364a Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 20 May 2024 23:37:58 +0000 Subject: [PATCH] [autorelease] Only mount accessible directories in /. Otherwise running any tools fails with an obscure wasmtime message about preopens on wasmtime>=21. This is similar to the change in commit c26c8d4d. --- yowasp_runtime/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yowasp_runtime/__init__.py b/yowasp_runtime/__init__.py index e9a5d75..e766505 100644 --- a/yowasp_runtime/__init__.py +++ b/yowasp_runtime/__init__.py @@ -68,7 +68,7 @@ def run_wasm(__package__, wasm_filename, *, resources=[], argv): else: # can't do this for files, but no one's going to use yowasp on files in / anyway for path in os.listdir("/"): - if os.path.isdir("/" + path): + if os.path.isdir("/" + path) and os.access("/" + path, os.R_OK): wasi_cfg.preopen_dir("/" + path, "/" + path) # preopens for relative paths