Merge pull request #14656 from nextcloud/trash-prevent-recursion

prevent recursion when moving a file to the trashbin
This commit is contained in:
Morris Jobke 2019-03-13 17:16:48 +01:00 committed by GitHub
commit cdd84d6631
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -99,7 +99,10 @@ class TrashManager implements ITrashManager {
}
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;
}