From e41a9c070c8878b57e7c58f652022baf96da2d1a Mon Sep 17 00:00:00 2001 From: HaudinFlorence Date: Tue, 12 Dec 2023 00:22:33 +0100 Subject: [PATCH] Try to implement the delete method in Drive class in contents.ts. --- src/contents.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/contents.ts b/src/contents.ts index 95dfe62..5486ccf 100644 --- a/src/contents.ts +++ b/src/contents.ts @@ -452,6 +452,17 @@ export class Drive implements Contents.IDrive { throw err; }*/ + const content: Array = drive1Contents.content; + + content.forEach(item => { + if (item.path === localPath) { + const index = content.indexOf(item); + if (index !== -1) { + content.splice(index, 1); + } + } + }); + this._fileChanged.emit({ type: 'delete', oldValue: { path: localPath },