Skip to content

Commit

Permalink
sys:es: fix LocalFile internal node_os_path on unix
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Giannini authored and Matthew Giannini committed Nov 20, 2024
1 parent a4d13e7 commit 7dc1ae2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sys/es/fan/LocalFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7dc1ae2

Please sign in to comment.