From 1d851ecfe2b0c36fc5cb15bfeff0176d050f4dc0 Mon Sep 17 00:00:00 2001 From: Martin Aeschlimann Date: Tue, 25 Jun 2019 17:20:41 +0200 Subject: [PATCH] MainThreadFileSystem does not await --- src/vs/workbench/api/browser/mainThreadFileSystem.ts | 8 ++++---- src/vs/workbench/api/common/extHostFileSystem.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vs/workbench/api/browser/mainThreadFileSystem.ts b/src/vs/workbench/api/browser/mainThreadFileSystem.ts index 5a52faf060e..cb84e3c1323 100644 --- a/src/vs/workbench/api/browser/mainThreadFileSystem.ts +++ b/src/vs/workbench/api/browser/mainThreadFileSystem.ts @@ -96,19 +96,19 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape { } async $rename(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise { - this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite); + await this._fileService.move(URI.revive(source), URI.revive(target), opts.overwrite); } async $copy(source: UriComponents, target: UriComponents, opts: FileOverwriteOptions): Promise { - this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite); + await this._fileService.copy(URI.revive(source), URI.revive(target), opts.overwrite); } async $mkdir(uri: UriComponents): Promise { - this._fileService.createFolder(URI.revive(uri)); + await this._fileService.createFolder(URI.revive(uri)); } async $delete(uri: UriComponents, opts: FileDeleteOptions): Promise { - this._fileService.del(URI.revive(uri), opts); + await this._fileService.del(URI.revive(uri), opts); } } diff --git a/src/vs/workbench/api/common/extHostFileSystem.ts b/src/vs/workbench/api/common/extHostFileSystem.ts index 0159b6403eb..778a5cb67ad 100644 --- a/src/vs/workbench/api/common/extHostFileSystem.ts +++ b/src/vs/workbench/api/common/extHostFileSystem.ts @@ -124,7 +124,7 @@ class ConsumerFileSystem implements vscode.FileSystem { return this._proxy.$writeFile(uri, VSBuffer.wrap(content), options); } delete(uri: vscode.Uri, options: { recursive: boolean; } = { recursive: false }): Promise { - return this._proxy.$delete(uri, { ...options, useTrash: true }); //todo@joh useTrash + return this._proxy.$delete(uri, { ...options, useTrash: false }); //todo@joh useTrash } rename(oldUri: vscode.Uri, newUri: vscode.Uri, options: { overwrite: boolean; } = { overwrite: false }): Promise { return this._proxy.$rename(oldUri, newUri, options); -- GitLab