mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:04:14 +08:00
nicer import
This commit is contained in:
parent
e585e4bf00
commit
90eefbfa87
@ -929,7 +929,7 @@ export class FileService implements IFileService {
|
||||
private doMoveItemToTrash(resource: uri): TPromise<void> {
|
||||
const absolutePath = resource.fsPath;
|
||||
|
||||
const shell = (require.__$__nodeRequire('electron') as Electron.RendererInterface).shell; // workaround for being able to run tests out of VSCode debugger
|
||||
const shell = (require('electron') as Electron.RendererInterface).shell; // workaround for being able to run tests out of VSCode debugger
|
||||
const result = shell.moveItemToTrash(absolutePath);
|
||||
if (!result) {
|
||||
return TPromise.wrapError(new Error(isWindows ? nls.localize('binFailed', "Failed to move '{0}' to the recycle bin", paths.basename(absolutePath)) : nls.localize('trashFailed', "Failed to move '{0}' to the trash", paths.basename(absolutePath))));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user