From 37b161b526386605cd1698dc52561cda7e3eab03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 3 Mar 2021 14:26:35 +0100 Subject: [PATCH] Remove trash items from other trash backends when deleting all MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files_trashbin/lib/Sabre/TrashRoot.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_trashbin/lib/Sabre/TrashRoot.php b/apps/files_trashbin/lib/Sabre/TrashRoot.php index c2e96b20d3..5d41a81e67 100644 --- a/apps/files_trashbin/lib/Sabre/TrashRoot.php +++ b/apps/files_trashbin/lib/Sabre/TrashRoot.php @@ -50,6 +50,9 @@ class TrashRoot implements ICollection { public function delete() { \OCA\Files_Trashbin\Trashbin::deleteAll(); + foreach ($this->trashManager->listTrashRoot($this->user) as $trashItem) { + $this->trashManager->removeItem($trashItem); + } } public function getName(): string {