From 52e4ee4d44daea4e68cdea9e23e349c7109cb266 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 25 Oct 2024 14:52:51 +1100 Subject: [PATCH] fixup! fix: remove trailing slashes for fs.open to address Node v23 bug --- st.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/st.js b/st.js index 0e79cdc..6bb0b2f 100644 --- a/st.js +++ b/st.js @@ -226,7 +226,7 @@ class Mount { // trailing slash removal to fix Node.js v23 bug // https://github.com/nodejs/node/pull/55527 // can be removed when this is resolved and released - return path.join(this.path, u).replace(/\/+$/, '') + return path.normalize(path.join(this.path, u)).replace(/[\\\\/]+$/, '') } // get a url from a path