summaryrefslogtreecommitdiff
path: root/lib/path.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/path.js b/lib/path.js
index 884da4cd8e..395fe1f357 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -44,8 +44,8 @@ function isPosixPathSeparator(code) {
}
function isWindowsDeviceRoot(code) {
- return code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z ||
- code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z;
+ return (code >= CHAR_UPPERCASE_A && code <= CHAR_UPPERCASE_Z) ||
+ (code >= CHAR_LOWERCASE_A && code <= CHAR_LOWERCASE_Z);
}
// Resolves . and .. elements in a path with directory names
@@ -155,8 +155,8 @@ 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 ||
- path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&
- path.charCodeAt(2) === CHAR_BACKWARD_SLASH) {
+ (path.slice(0, 2).toLowerCase() !== resolvedDevice.toLowerCase() &&
+ path.charCodeAt(2) === CHAR_BACKWARD_SLASH)) {
path = `${resolvedDevice}\\`;
}
}
@@ -358,10 +358,10 @@ const win32 = {
const code = path.charCodeAt(0);
return isPathSeparator(code) ||
// Possible device root
- len > 2 &&
+ (len > 2 &&
isWindowsDeviceRoot(code) &&
path.charCodeAt(1) === CHAR_COLON &&
- isPathSeparator(path.charCodeAt(2));
+ isPathSeparator(path.charCodeAt(2)));
},
join(...args) {