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 52e4ee4 commit cea5a1e
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.normalize(path.join(this.path, u)).replace(/[\\\\/]+$/, '')
return path.join(this.path, u.replace(/\/+$/, ''))
}

// get a url from a path
Expand Down

0 comments on commit cea5a1e

Please sign in to comment.