mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
committed by
Benjamin Pasero
parent
d813a31418
commit
e9d6a653e6
10
src/bootstrap.js
vendored
10
src/bootstrap.js
vendored
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user