Skip to content

Commit

Permalink
Merge pull request #14661 from nextcloud/backport/14656/stable15
Browse files Browse the repository at this point in the history
[stable15] prevent recursion when moving a file to the trashbin
  • Loading branch information
rullzer authored Mar 13, 2019
2 parents 1c7f091 + 57471cc commit cdb3602
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/files_trashbin/lib/Trash/TrashManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ public function moveToTrash(IStorage $storage, string $internalPath): bool {
}
try {
$backend = $this->getBackendForStorage($storage);
return $backend->moveToTrash($storage, $internalPath);
$this->trashPaused = true;
$result = $backend->moveToTrash($storage, $internalPath);
$this->trashPaused = false;
return $result;
} catch (BackendNotFoundException $e) {
return false;
}
Expand Down

0 comments on commit cdb3602

Please sign in to comment.