Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ See docs/process.md for more on how version tagging works.

3.1.75 (in development)
-----------------------
- `FS.basename()` no longer calls `PATH.normalize()`, so that
`FS.basename("a/.")` returns `"."` instead of `"a"` and `FS.basename("a/b/..")`
returns `".."` instead of `"a"`. (#23180)

3.1.74 - 12/14/24
-----------------
Expand Down
3 changes: 1 addition & 2 deletions src/library_path.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ addToLibrary({
basename: (path) => {
// EMSCRIPTEN return '/'' for '/', not an empty string
if (path === '/') return '/';
path = PATH.normalize(path);
path = path.replace(/\/$/, "");
path = path.replace(/\/+$/g, "");
var lastSlash = path.lastIndexOf('/');
if (lastSlash === -1) return path;
return path.substr(lastSlash+1);
Expand Down
Loading