sql.js icon indicating copy to clipboard operation
sql.js copied to clipboard

Electron package related bug when load wasm file

Open justid opened this issue 2 years ago • 1 comments

The original code filename = nodePath'normalize'; is buggy when using it used with electron package. fs.readFile will take this to a wrong path on electron packaged. For exmaple: I have a packaged file path "'file:///C:/**/resources/app/dist/demo.wasm", fs.readFile will throw a error like: "Error: ENOENT: no such file or directory, open 'C::\C:\resources\app\dist\demo.wasm"

Actually it's a bug with emscripten, I have created a pull request for emscripten https://github.com/emscripten-core/emscripten/pull/18226)

justid avatar Nov 17 '22 13:11 justid

it's fixed in emscripten (https://github.com/emscripten-core/emscripten/pull/17915). Maybe should sync to this project since these code is strongly related.

justid avatar Nov 17 '22 13:11 justid