bootstrap - handle UNC paths correctly (#66128)

fixes #53857
This commit is contained in:
Tereza Tomcova
2019-01-07 12:51:27 +01:00
committed by Benjamin Pasero
parent d813a31418
commit e9d6a653e6

10
src/bootstrap.js vendored
View File

@@ -69,7 +69,15 @@ exports.uriFromPath = function (_path) {
pathName = '/' + pathName;
}
return encodeURI('file://' + pathName).replace(/#/g, '%23');
/** @type {string} */
let uri;
if (pathName.startsWith('//')) {
uri = encodeURI('file:' + pathName);
} else {
uri = encodeURI('file://' + pathName);
}
return uri.replace(/#/g, '%23');
};
//#endregion