From 1bb5a3ce3c973e3d3a21771362a639ddad3a5756 Mon Sep 17 00:00:00 2001 From: Chris Lloyd Date: Sun, 2 Jun 2019 10:11:00 +0100 Subject: [PATCH] Update to use directory and lookupPath --- electron/src/electron/filesystem.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/electron/src/electron/filesystem.ts b/electron/src/electron/filesystem.ts index 5a66aec47..574154f37 100644 --- a/electron/src/electron/filesystem.ts +++ b/electron/src/electron/filesystem.ts @@ -115,10 +115,12 @@ export class FilesystemPluginElectron extends WebPlugin implements FilesystemPlu }); } - // TODO: continue bring to spec. rmdir(options: RmdirOptions): Promise { return new Promise((resolve, reject) => { - this.NodeFS.rmdir(options.path, (err:any) => { + if(Object.keys(this.fileLocations).indexOf(options.directory) === -1) + reject(`${options.directory} is currently not supported in the Electron implementation.`); + let lookupPath = this.fileLocations[options.directory] + options.path; + this.NodeFS.rmdir(lookupPath, (err:any) => { if(err) { reject(err); return;