Skip to content

Commit

Permalink
prevent recursion when moving a file to the trashbin
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 authored and Backportbot committed Mar 13, 2019
1 parent 1c7f091 commit 57471cc
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 57471cc

Please sign in to comment.