提交 a49b529c 编写于 作者: J jordanmkasla2009

Path already has a colon

上级 66eb6d5d
......@@ -274,11 +274,14 @@ export class WindowsService implements IWindowsService, IDisposable {
private parseURIForOpen(uri: URI): string {
if (uri.authority === 'file') {
let path = uri.path.substr(1);
if (path.slice(0, path.indexOf('/')).length === 1) { // add a colon if the uri.path contains a valid drive letter.
let drive = path.slice(0, path.indexOf('/'));
if (drive.length === 1) { // add a colon if the uri.path contains a valid drive letter.
path = path.slice(0, path.indexOf('/')) + ':' + path.slice(path.indexOf('/'));
return path;
}
if (drive.length === 2 && drive.indexOf(':')) { // path has a colon already
return path;
}
return uri.path;
}
return uri.path;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册