diff --git a/tests/sandbox/js/ttkproxy.js b/tests/sandbox/js/ttkproxy.js index d805d0f6..b62be65e 100644 --- a/tests/sandbox/js/ttkproxy.js +++ b/tests/sandbox/js/ttkproxy.js @@ -73,7 +73,7 @@ class TTkProxy { } async loadFile(fileUri,file){ - this.pyodide.FS.writeFile(this.pyodide.FS.currentPath+file, await (await fetch(fileUri)).text()); + this.pyodide.FS.writeFile(this.pyodide.FS.currentPath+'/'+file, await (await fetch(fileUri)).text()); } readFile(file){ diff --git a/tests/sandbox/sandbox.NerdFont.html b/tests/sandbox/sandbox.NerdFont.html index dced2e1b..8c1a4e93 100644 --- a/tests/sandbox/sandbox.NerdFont.html +++ b/tests/sandbox/sandbox.NerdFont.html @@ -147,7 +147,7 @@ fileUri = urlParams.get("fileUri") filePath = urlParams.get("filePath") if (fileUri != null){ - ttkProxy.loadFile(fileUri, "test_file.py"); + await ttkProxy.loadFile(fileUri, "test_file.py"); loadFile("test_file.py") }else if (filePath != null){ loadFile(filePath) diff --git a/tests/sandbox/sandbox.base.html b/tests/sandbox/sandbox.base.html index 9557835c..deeba8b7 100644 --- a/tests/sandbox/sandbox.base.html +++ b/tests/sandbox/sandbox.base.html @@ -157,7 +157,7 @@ fileUri = urlParams.get("fileUri") filePath = urlParams.get("filePath") if (fileUri != null){ - ttkProxy.loadFile(fileUri, "test_file.py"); + await ttkProxy.loadFile(fileUri, "test_file.py"); loadFile("test_file.py") }else if (filePath != null){ loadFile(filePath)