Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
path: fix win32 parse regression
This fixes the parse function for single character input that are not
a path separator.

Fixes: #26911
  • Loading branch information
BridgeAR committed Mar 26, 2019
commit 2e508e912e92633b23a3f7bb3249f11f14735aa4
1 change: 1 addition & 0 deletions lib/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ const win32 = {
ret.root = ret.dir = path;
return ret;
}
ret.base = ret.name = path;
return ret;
}
// Try to match a root
Expand Down
1 change: 1 addition & 0 deletions test/parallel/test-path-parse-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const winPaths = [
];

const winSpecialCaseParseTests = [
['t', { base: 't', name: 't', root: '', dir: '', ext: '' }],
['/foo/bar', { root: '/', dir: '/foo', base: 'bar', ext: '', name: 'bar' }],
];

Expand Down