diff --git a/tools/files.js b/tools/files.js index 89ef757614..2eb6368fb4 100644 --- a/tools/files.js +++ b/tools/files.js @@ -1175,7 +1175,7 @@ var toPosixPath = function (p, notAbsolute) { var toDosPath = function (p, notAbsolute) { if (p[0] === '/' && ! notAbsolute) { - if (! /^\/[A-Za-z]\//.test(p)) + if (! /^\/[A-Za-z](\/|$)/.test(p)) throw new Error("Surprising path: " + p); // transform a previously windows path back // "/C/something" to "c:/something"