]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove trash items from other trash backends when deleting all 26040/head
authorJulius Härtl <jus@bitgrid.net>
Wed, 3 Mar 2021 13:26:35 +0000 (14:26 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 10 Mar 2021 08:02:38 +0000 (08:02 +0000)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files_trashbin/lib/Sabre/TrashRoot.php

index c2e96b20d3281226e5d3842811dec4ad8db345eb..5d41a81e6706b4c544517bc1a1f7929d5d34a06f 100644 (file)
@@ -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 {