From 7d69a1c962175789eb2e58811b0551108ff6db24 Mon Sep 17 00:00:00 2001 From: Alex Ross Date: Tue, 10 Dec 2024 16:38:03 +0100 Subject: [PATCH] Allow accepting a path in the simple file picker when items haven't been listed (#235740) Fixes #232950 --- src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts index 843d9ed0a0c..c4faf15f40b 100644 --- a/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts +++ b/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts @@ -497,7 +497,7 @@ export class SimpleFileDialog extends Disposable implements ISimpleFileDialog { private async onDidAccept(): Promise { 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;