From cea5a1e18a730f50e8158556a848d3d18881b291 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 25 Oct 2024 15:26:01 +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 6bb0b2f..d8aeb62 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.normalize(path.join(this.path, u)).replace(/[\\\\/]+$/, '') + return path.join(this.path, u.replace(/\/+$/, '')) } // get a url from a path