未验证 提交 d2cf8af4 编写于 作者: D Daniel Imms 提交者: GitHub

Merge pull request #95365 from connorskees/issue-95364

Strip \\?\ from absolute Windows paths
......@@ -544,6 +544,10 @@ export class TerminalLinkManager extends DisposableStore {
return null;
}
link = this.osPath.join(this._processCwd, link);
} else {
// Remove \\?\ from paths so that they share the same underlying
// uri and don't open multiple tabs for the same file
link = link.replace(/^\\\\\?\\/, '');
}
} else {
if (!this._processCwd) {
......
......@@ -254,6 +254,7 @@ suite('Workbench - TerminalLinkHandler', () => {
assert.equal(linkHandler.preprocessPath('~/src/file3'), 'C:\\Users\\Me\\src\\file3');
assert.equal(linkHandler.preprocessPath('~\\src\\file4'), 'C:\\Users\\Me\\src\\file4');
assert.equal(linkHandler.preprocessPath('C:\\absolute\\path\\file5'), 'C:\\absolute\\path\\file5');
assert.equal(linkHandler.preprocessPath('\\\\?\\C:\\absolute\\path\\extended\\file6'), 'C:\\absolute\\path\\extended\\file6');
});
test('Windows - spaces', () => {
const linkHandler = new TestTerminalLinkManager(new TestXterm() as any, {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册