Skip to content

Commit

Permalink
fixup! fix: remove trailing slashes for fs.open to address Node v23 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Oct 25, 2024
1 parent 1c01a08 commit 52e4ee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion st.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 52e4ee4

Please sign in to comment.