Skip to content

Commit 1268ac8

Browse files
author
Benjamin Pasero
committed
working copies - add missing await on canMove/Copy/Delete
1 parent 9bebaef commit 1268ac8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/vs/workbench/services/workingCopy/common/workingCopyFileService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class WorkingCopyFileService extends Disposable implements IWorkingCopyFi
220220
private async moveOrCopy(source: URI, target: URI, move: boolean, overwrite?: boolean): Promise<IFileStatWithMetadata> {
221221

222222
// validate move/copy operation before starting
223-
const validateMoveOrCopy = move ? this.fileService.canMove(source, target, overwrite) : this.fileService.canCopy(source, target, overwrite);
223+
const validateMoveOrCopy = await (move ? this.fileService.canMove(source, target, overwrite) : this.fileService.canCopy(source, target, overwrite));
224224
if (validateMoveOrCopy instanceof Error) {
225225
throw validateMoveOrCopy;
226226
}
@@ -275,7 +275,7 @@ export class WorkingCopyFileService extends Disposable implements IWorkingCopyFi
275275
async delete(resource: URI, options?: { useTrash?: boolean, recursive?: boolean }): Promise<void> {
276276

277277
// validate delete operation before starting
278-
const validateDelete = this.fileService.canDelete(resource, options);
278+
const validateDelete = await this.fileService.canDelete(resource, options);
279279
if (validateDelete instanceof Error) {
280280
throw validateDelete;
281281
}

0 commit comments

Comments
 (0)