From 23359c83efc612ef167c2fe97ab2e9c2b0810029 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Thu, 18 Dec 2014 16:11:05 -0800 Subject: [PATCH] Fix absolute-ish paths on Windows --- tools/files.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/files.js b/tools/files.js index a88cd00a7c..413f367883 100644 --- a/tools/files.js +++ b/tools/files.js @@ -1114,6 +1114,12 @@ files.adaptLegacyPath = function (p) { /////// Below here, functions have been corrected for slashes var toPosixPath = function (p, notAbsolute) { + // Sometimes, you can have a path like \Users\IEUser on windows, and this + // actually means you want C:\Users\IEUser + if (p[0] === "\\" && (! notAbsolute)) { + p = process.env.SystemDrive + p; + } + p = p.replace(/\\/g, '/'); if (p[1] === ':' && ! notAbsolute) { // transform "C:/bla/bla" to "/C/bla/bla"