diff --git a/src/library_nodepath.js b/src/library_nodepath.js index c42820f36e289..f867e4ccf2309 100644 --- a/src/library_nodepath.js +++ b/src/library_nodepath.js @@ -14,11 +14,11 @@ addToLibrary({ $PATH: { isAbs: (path) => nodePath['isAbsolute'](path), - normalize: (path) => nodePath['normalize'](path), + normalize: (path) => nodePath['posix']['normalize'](path), dirname: (path) => nodePath['dirname'](path), basename: (path) => nodePath['basename'](path), - join: (...args) => nodePath['join'](...args), - join2: (l, r) => nodePath['join'](l, r), + join: (...args) => nodePath['posix']['join'](...args), + join2: (l, r) => nodePath['posix']['join'](l, r), }, // The FS-using parts are split out into a separate object, so simple path // usage does not require the FS. diff --git a/test/test_other.py b/test/test_other.py index e01500b744559..d3c94bebe6fcb 100644 --- a/test/test_other.py +++ b/test/test_other.py @@ -9640,6 +9640,7 @@ def test_toolchain_profiler_stderr(self): self.assertContained('block "main" took', stderr) @also_with_wasmfs + @crossplatform def test_noderawfs(self): self.run_process([EMXX, test_file('fs/test_fopen_write.cpp'), '-sNODERAWFS'] + self.get_emcc_args()) self.assertContained("read 11 bytes. Result: Hello data!", self.run_js('a.out.js'))