Skip to content

Commit 90a0ecc

Browse files
author
Benjamin Pasero
committed
workspaces - do not leave stale untitled workspaces around
1 parent bf31134 commit 90a0ecc

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,11 @@ export abstract class AbstractWorkspaceEditingService implements IWorkspaceEditi
200200
const remoteAuthority = this.environmentService.configuration.remoteAuthority;
201201
const untitledWorkspace = await this.workspacesService.createUntitledWorkspace(folders, remoteAuthority);
202202
if (path) {
203-
await this.saveWorkspaceAs(untitledWorkspace, path);
204-
await this.workspacesService.deleteUntitledWorkspace(untitledWorkspace); // https://github.com/microsoft/vscode/issues/100276
203+
try {
204+
await this.saveWorkspaceAs(untitledWorkspace, path);
205+
} finally {
206+
await this.workspacesService.deleteUntitledWorkspace(untitledWorkspace); // https://github.com/microsoft/vscode/issues/100276
207+
}
205208
} else {
206209
path = untitledWorkspace.configPath;
207210
}

0 commit comments

Comments
 (0)