path: fix win32 parse regression
This fixes the parse function for single character input that are not a path separator. PR-URL: https://github.com/nodejs/node/pull/26912 Fixes: https://github.com/nodejs/node/issues/26911 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
parent
4c4ad120c5
commit
3cf1ffebab
@ -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
|
||||
|
@ -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' }],
|
||||
];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user