Skip to content

Commit

Permalink
Fix file browser opening race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Gagnon committed Jul 13, 2023
1 parent 0430ad9 commit db4e125
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export class FileBrowserDialog extends Modal {
fileValidationServiceType: string,
): void {
this._viewModel.initialize(ownerUri, expandPath, fileFilters, fileValidationServiceType);
this._viewModel.openFileBrowser(0, false).catch(err => onUnexpectedError(err));
this._fileFilterSelectBox.setOptions(this._viewModel.formattedFileFilters);
this._fileFilterSelectBox.select(0);
this._filePathInputBox.value = expandPath;
Expand All @@ -125,7 +126,6 @@ export class FileBrowserDialog extends Modal {
this._fileBrowserTreeView = this._instantiationService.createInstance(FileBrowserTreeView);
this._fileBrowserTreeView.setOnClickedCallback((arg) => this.onClicked(arg));
this._fileBrowserTreeView.setOnDoubleClickedCallback((arg) => this.onDoubleClicked(arg));
this._viewModel.openFileBrowser(0, false).catch(err => onUnexpectedError(err));
}

/* enter key */
Expand Down

0 comments on commit db4e125

Please sign in to comment.