Skip to content

Commit

Permalink
Merge pull request #26039 from nextcloud/backport/25916/stable21
Browse files Browse the repository at this point in the history
[stable21] Remove trash items from other trash backends when deleting all
  • Loading branch information
PVince81 authored Mar 11, 2021
2 parents 0e8ada1 + deb01f0 commit 1d0b210
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/files_trashbin/lib/Sabre/TrashRoot.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public function __construct(IUser $user, ITrashManager $trashManager) {

public function delete() {
\OCA\Files_Trashbin\Trashbin::deleteAll();
foreach ($this->trashManager->listTrashRoot($this->user) as $trashItem) {
$this->trashManager->removeItem($trashItem);
}
}

public function getName(): string {
Expand Down

0 comments on commit 1d0b210

Please sign in to comment.