提交 5f87a2ad 编写于 作者: J Joao Moreno

properly handle git uris in getOpenRepository

fixes #40408
上级 424c9da7
......@@ -13,6 +13,7 @@ import { Git, GitErrorCodes } from './git';
import * as path from 'path';
import * as fs from 'fs';
import * as nls from 'vscode-nls';
import { fromGitUri } from './uri';
const localize = nls.loadMessageBundle();
......@@ -300,7 +301,13 @@ export class Model {
}
if (hint instanceof Uri) {
const resourcePath = hint.fsPath;
let resourcePath: string;
if (hint.scheme === 'git') {
resourcePath = fromGitUri(hint).path;
} else {
resourcePath = hint.fsPath;
}
outer:
for (const liveRepository of this.openRepositories.sort((a, b) => b.repository.root.length - a.repository.root.length)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册