提交 4af3d179 编写于 作者: J João Moreno

fixes #16255

上级 81e8f7ba
......@@ -45,7 +45,7 @@ export class GitContentProvider implements IWorkbenchContribution, ITextModelCon
}
const path = uri.fsPath;
const relativePath = paths.relative(root, path);
const relativePath = paths.relative(root, path).replace(/\\/g, '/');
const treeish = gitModel.getStatus().find(relativePath, StatusType.INDEX) ? '~' : 'HEAD';
return this.gitService.buffer(path, treeish)
......
......@@ -189,7 +189,7 @@ export class RawGitService implements IRawGitService {
treeish = (!treeish || treeish === '~') ? '' : treeish;
if (isAbsolute(filePath)) {
filePath = relative(this.repo.path, filePath);
filePath = relative(this.repo.path, filePath).replace(/\\/g, '/');
}
return this.repo.buffer(treeish + ':' + filePath).then(null, e => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册