Path.js throws away one character paths. · Issue #26911 · nodejs/node (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@mdavis199

Description

@mdavis199

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.

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;