X Tutup
Skip to content

path: fix path.normalize not correctly normalizing relative paths#17974

Closed
starkwang wants to merge 2 commits intonodejs:masterfrom
starkwang:fix-path-normalize
Closed

path: fix path.normalize not correctly normalizing relative paths#17974
starkwang wants to merge 2 commits intonodejs:masterfrom
starkwang:fix-path-normalize

Conversation

@starkwang
Copy link
Copy Markdown
Contributor

@starkwang starkwang commented Jan 4, 2018

After slicing, the lastSegmentLength should be calculated again.
It should be (res.length - 1 - lastSlashIndex), instead of value j.

Tests for it is also added.

Fixes: #17928

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

path

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

path Issues and PRs related to the path subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

win32 path.normalize() not correctly normalizing relative paths containing ../ that advance above root

7 participants

X Tutup