mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
file picker should only reveal files, not folders nor workspaces, fixes https://github.com/microsoft/vscode/issues/116297
This commit is contained in:
parent
20b8e5fddd
commit
a025039b4e
|
@ -427,15 +427,9 @@ export class BreadcrumbsFilePicker extends BreadcrumbsPicker {
|
|||
}
|
||||
|
||||
async _revealElement(element: IFileStat | IWorkspaceFolder, options: IEditorOptions, sideBySide: boolean): Promise<boolean> {
|
||||
let resource: URI | undefined;
|
||||
if (isWorkspaceFolder(element)) {
|
||||
resource = element.uri;
|
||||
} else if (!element.isDirectory) {
|
||||
resource = element.resource;
|
||||
}
|
||||
if (resource) {
|
||||
if (!isWorkspaceFolder(element) && element.isFile) {
|
||||
this._onWillPickElement.fire();
|
||||
await this._editorService.openEditor({ resource, options }, sideBySide ? SIDE_GROUP : undefined);
|
||||
await this._editorService.openEditor({ resource: element.resource, options }, sideBySide ? SIDE_GROUP : undefined);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue