bug with preventing saving an already open workspsace

This commit is contained in:
Martin Aeschlimann 2019-04-25 09:33:09 +02:00
parent 146ab7b489
commit 4c7fed5523

View file

@ -244,7 +244,7 @@ export class WorkspaceEditingService implements IWorkspaceEditingService {
} }
async createAndEnterWorkspace(folders: IWorkspaceFolderCreationData[], path?: URI): Promise<void> { async createAndEnterWorkspace(folders: IWorkspaceFolderCreationData[], path?: URI): Promise<void> {
if (path && !this.isValidTargetWorkspacePath(path)) { if (path && !await this.isValidTargetWorkspacePath(path)) {
return Promise.reject(null); return Promise.reject(null);
} }
const remoteAuthority = this.environmentService.configuration.remoteAuthority; const remoteAuthority = this.environmentService.configuration.remoteAuthority;
@ -258,7 +258,7 @@ export class WorkspaceEditingService implements IWorkspaceEditingService {
} }
async saveAndEnterWorkspace(path: URI): Promise<void> { async saveAndEnterWorkspace(path: URI): Promise<void> {
if (!this.isValidTargetWorkspacePath(path)) { if (!await this.isValidTargetWorkspacePath(path)) {
return Promise.reject(null); return Promise.reject(null);
} }
const workspaceIdentifier = this.getCurrentWorkspaceIdentifier(); const workspaceIdentifier = this.getCurrentWorkspaceIdentifier();