summaryrefslogtreecommitdiff
path: root/lib/path.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/path.js b/lib/path.js
index ad8fd8d787..961dc400a5 100644
--- a/lib/path.js
+++ b/lib/path.js
@@ -179,6 +179,9 @@ if (isWindows) {
tail += '\\';
}
+ // Convert slashes to backslashes when `device` points to an UNC root.
+ device = device.replace(/\//g, '\\');
+
return device + (isAbsolute ? '\\' : '') + tail;
};