path: using .relative() should not return a trailing slash · nodejs/node@18c56df · GitHub
Skip to content

Commit 18c56df

Browse files
BridgeARtargos
authored andcommitted
path: using .relative() should not return a trailing slash
Resolving a path against root with `path.relative()` should not include a trailing slash. Fixes: #28549 PR-URL: #28556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
1 parent 17df75f commit 18c56df

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

lib/path.js

Lines changed: 10 additions & 5 deletions

test/parallel/test-path-relative.js

Lines changed: 2 additions & 1 deletion

0 commit comments

Comments
 (0)