Allow accepting a path in the simple file picker when items haven't been listed (#235740)

Fixes #232950
pull/235746/head
Alex Ross 2024-12-10 16:38:03 +01:00 committed by GitHub
parent af44fbc265
commit 7d69a1c962
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -497,7 +497,7 @@ export class SimpleFileDialog extends Disposable implements ISimpleFileDialog {
private async onDidAccept(): Promise<URI | undefined> {
this.busy = true;
if (this.filePickBox.activeItems.length === 1) {
if (!this.updatingPromise && this.filePickBox.activeItems.length === 1) {
const item = this.filePickBox.selectedItems[0];
if (item.isFolder) {
if (this.trailing) {
@ -519,7 +519,7 @@ export class SimpleFileDialog extends Disposable implements ISimpleFileDialog {
this.filePickBox.busy = false;
return;
}
} else {
} else if (!this.updatingPromise) {
// If the items have updated, don't try to resolve
if ((await this.tryUpdateItems(this.filePickBox.value, this.filePickBoxValue())) !== UpdateResult.NotUpdated) {
this.filePickBox.busy = false;