Skip to content

Commit

Permalink
Merge pull request #14656 from nextcloud/trash-prevent-recursion
Browse files Browse the repository at this point in the history
prevent recursion when moving a file to the trashbin
  • Loading branch information
MorrisJobke authored Mar 13, 2019
2 parents c5c2192 + 0d41138 commit cdd84d6
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 cdd84d6

Please sign in to comment.