File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ See docs/process.md for more on how version tagging works.
20
20
21
21
3.1.75 (in development)
22
22
-----------------------
23
+ - ` PATH.basename() ` no longer calls ` PATH.normalize() ` , so that
24
+ ` PATH.basename("a/.") ` returns ` "." ` instead of ` "a" ` and
25
+ ` PATH.basename("a/b/..") ` returns ` ".." ` instead of ` "a" ` . This is in line with
26
+ the behaviour of both node and coreutils, and is already the case when using
27
+ NODERAWFS". (#23180 )
23
28
24
29
3.1.74 - 12/14/24
25
30
-----------------
Original file line number Diff line number Diff line change @@ -64,10 +64,9 @@ addToLibrary({
64
64
return root + dir ;
65
65
} ,
66
66
basename : ( path ) => {
67
- // EMSCRIPTEN return '/'' for '/', not an empty string
67
+ // EMSCRIPTEN return '/' for '/', not an empty string
68
68
if ( path === '/' ) return '/' ;
69
- path = PATH . normalize ( path ) ;
70
- path = path . replace ( / \/ $ / , "" ) ;
69
+ path = path . replace ( / \/ + $ / g, "" ) ;
71
70
var lastSlash = path . lastIndexOf ( '/' ) ;
72
71
if ( lastSlash === - 1 ) return path ;
73
72
return path . substr ( lastSlash + 1 ) ;
You can’t perform that action at this time.
0 commit comments