Skip to content

Commit

Permalink
path: refactor to use more primordials
Browse files Browse the repository at this point in the history
PR-URL: nodejs#37893
Reviewed-By: Pooja D P <Pooja.D.P@ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
  • Loading branch information
marsonya authored and Lxxyx committed Apr 1, 2021
1 parent 31fe3b2 commit 3ef9562
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ const win32 = {
// Verify that a cwd was found and that it actually points
// to our drive. If not, default to the drive's root.
if (path === undefined ||
(StringPrototypeSlice(path, 0, 2).toLowerCase() !==
(StringPrototypeToLowerCase(StringPrototypeSlice(path, 0, 2)) !==
StringPrototypeToLowerCase(resolvedDevice) &&
StringPrototypeCharCodeAt(path, 2) === CHAR_BACKWARD_SLASH)) {
path = `${resolvedDevice}\\`;
Expand Down Expand Up @@ -1321,7 +1321,7 @@ const posix = {
return StringPrototypeSlice(path, startDot, end);
},

format: _format.bind(null, '/'),
format: FunctionPrototypeBind(_format, null, '/'),

parse(path) {
validateString(path, 'path');
Expand Down

0 comments on commit 3ef9562

Please sign in to comment.