Skip to content

Commit

Permalink
workspace: handle exception in WorkspaceDeleteHandler (#12544)
Browse files Browse the repository at this point in the history
The commit properly handles a possible exception from `WorkspaceDeleteHandler` which previously did not `await`. 

Signed-off-by: Vlad Arama <vlad.arama@ericsson.com>
  • Loading branch information
vladarama authored May 24, 2023
1 parent 87bc890 commit 887e4a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/workspace/src/browser/workspace-delete-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export class WorkspaceDeleteHandler implements UriCommandHandler<URI[]> {

protected async moveFileToTrash(uri: URI, options: FileDeleteOptions): Promise<void> {
try {
this.fileService.delete(uri, { ...options, useTrash: true });
await this.fileService.delete(uri, { ...options, useTrash: true });
} catch (error) {
console.error('Error deleting with trash:', error);
if (await this.confirmDeletePermanently(uri)) {
Expand Down

0 comments on commit 887e4a2

Please sign in to comment.