From e2f531f64623901dffa7bdf1dd2d27757fa41c5e Mon Sep 17 00:00:00 2001 From: Akhil Marsonya Date: Wed, 24 Mar 2021 23:16:34 +0530 Subject: [PATCH] path: refactor to use more primordials PR-URL: https://github.com/nodejs/node/pull/37893 Reviewed-By: Pooja D P Reviewed-By: Antoine du Hamel Reviewed-By: Darshan Sen Reviewed-By: Luigi Pinca Reviewed-By: Trivikram Kamat Reviewed-By: Zijian Liu --- lib/path.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/path.js b/lib/path.js index 4845dbb0f0b553..079177694dc65c 100644 --- a/lib/path.js +++ b/lib/path.js @@ -178,7 +178,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}\\`; @@ -1410,7 +1410,7 @@ const posix = { return StringPrototypeSlice(path, startDot, end); }, - format: _format.bind(null, '/'), + format: FunctionPrototypeBind(_format, null, '/'), /** * @param {string} path