Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path.js throws away one character paths. #26911

Closed
mdavis199 opened this issue Mar 26, 2019 · 1 comment
Closed

Path.js throws away one character paths. #26911

mdavis199 opened this issue Mar 26, 2019 · 1 comment
Assignees
Labels
confirmed-bug Issues with confirmed bugs. path Issues and PRs related to the path subsystem.

Comments

@mdavis199
Copy link

  • Version:
    Master version in github
  • Platform:
    Windows
  • Subsystem:

The code to parse win32 paths, throws away paths that consist of one letter or character (unless its a forward or backward slash). Line 833 in the excerpt below, returns empty strings.

node/lib/path.js

Lines 826 to 833 in d989e20

if (len === 1) {
if (isPathSeparator(code)) {
// `path` contains just a path separator, exit early to avoid
// unnecessary work
ret.root = ret.dir = path;
return ret;
}
return ret;

@BridgeAR BridgeAR added confirmed-bug Issues with confirmed bugs. path Issues and PRs related to the path subsystem. labels Mar 26, 2019
@BridgeAR BridgeAR self-assigned this Mar 26, 2019
BridgeAR added a commit to BridgeAR/node that referenced this issue Mar 26, 2019
This fixes the parse function for single character input that are not
a path separator.

Fixes: nodejs#26911
@BridgeAR BridgeAR mentioned this issue Mar 26, 2019
4 tasks
@BridgeAR
Copy link
Member

@mdavis199 thanks for reporting this!

targos pushed a commit that referenced this issue Mar 28, 2019
This fixes the parse function for single character input that are not
a path separator.

PR-URL: #26912
Fixes: #26911
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
targos pushed a commit that referenced this issue Mar 29, 2019
This fixes the parse function for single character input that are not
a path separator.

PR-URL: #26912
Fixes: #26911
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
targos pushed a commit that referenced this issue Mar 30, 2019
This fixes the parse function for single character input that are not
a path separator.

PR-URL: #26912
Fixes: #26911
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
BethGriggs pushed a commit that referenced this issue Apr 5, 2019
This fixes the parse function for single character input that are not
a path separator.

PR-URL: #26912
Fixes: #26911
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. path Issues and PRs related to the path subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants