fix restart ADS warning showing twice for create project from db (#17214)

This commit is contained in:
Kim Santiago
2021-10-01 14:53:36 -07:00
committed by GitHub
parent 107b0ae683
commit d5b43df6d6
2 changed files with 25 additions and 27 deletions

View File

@@ -372,9 +372,6 @@ export class CreateProjectFromDatabaseDialog {
async validate(): Promise<boolean> {
try {
if (await getDataWorkspaceExtensionApi().validateWorkspace() === false) {
return false;
}
// the selected location should be an existing directory
const parentDirectoryExists = await exists(this.projectLocationTextBox!.value!);
if (!parentDirectoryExists) {
@@ -388,6 +385,11 @@ export class CreateProjectFromDatabaseDialog {
this.showErrorMessage(constants.ProjectDirectoryAlreadyExistError(this.projectNameTextBox!.value!, this.projectLocationTextBox!.value!));
return false;
}
if (await getDataWorkspaceExtensionApi().validateWorkspace() === false) {
return false;
}
return true;
} catch (err) {
this.showErrorMessage(err?.message ? err.message : err);