提交 efb01c62 编写于 作者: I isidor

remove some schema === 'file' checks

上级 93867e4e
......@@ -190,13 +190,13 @@ export class Workspace implements IWorkspace {
return null;
}
return this._foldersMap.findSubstr(resource.scheme === 'file' ? resource.fsPath : resource.authority);
return this._foldersMap.findSubstr(resource.toString());
}
private updateFoldersMap(): void {
this._foldersMap = new TrieMap<WorkspaceFolder>();
for (const folder of this.folders) {
this._foldersMap.insert(folder.uri.scheme === 'file' ? folder.uri.fsPath : folder.uri.authority, folder);
this._foldersMap.insert(folder.uri.toString(), folder);
}
}
......
......@@ -1210,7 +1210,7 @@ export class GlobalCompareResourcesAction extends Action {
}
label = paths.basename(resource.fsPath);
description = resource.scheme === 'file' ? labels.getPathLabel(paths.dirname(resource.fsPath), this.contextService, this.environmentService) : void 0;
description = labels.getPathLabel(resources.dirname(resource), this.contextService, this.environmentService);
return <IHistoryPickEntry>{ input, resource, label, description };
}).filter(p => !!p);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册