From 7dc1ae2c7e606fc11564a0021977331756de5dae Mon Sep 17 00:00:00 2001 From: Matthew Giannini Date: Wed, 20 Nov 2024 16:38:16 -0500 Subject: [PATCH] sys:es: fix LocalFile internal node_os_path on unix --- src/sys/es/fan/LocalFile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sys/es/fan/LocalFile.js b/src/sys/es/fan/LocalFile.js index 8eee4404e..5e470d92d 100644 --- a/src/sys/es/fan/LocalFile.js +++ b/src/sys/es/fan/LocalFile.js @@ -52,6 +52,11 @@ class LocalFile extends File { } instance.#node_os_path = url.fileURLToPath(uriStr).split(path.sep).join(path.posix.sep); } + else if (instance.#node_os_path.startsWith("file://")) { + // need to ensure that even on unix we remove the file scheme so + // various node functions will work. + instance.#node_os_path = url.fileURLToPath(instance.#node_os_path); + } return instance; }