diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-13 17:16:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-13 17:16:48 +0100 |
commit | cdd84d6631b581d1cf785bca182acda7d3a28ee5 (patch) | |
tree | 2f75e8cc548bd606bb2a0bb8757d124e75d76440 | |
parent | c5c219206107bfa8f84feb9bfc2429582183de69 (diff) | |
parent | 0d41138c6ec13c79106a5bc63299ec1791e6f933 (diff) | |
download | nextcloud-server-cdd84d6631b581d1cf785bca182acda7d3a28ee5.tar.gz nextcloud-server-cdd84d6631b581d1cf785bca182acda7d3a28ee5.zip |
Merge pull request #14656 from nextcloud/trash-prevent-recursion
prevent recursion when moving a file to the trashbin
-rw-r--r-- | apps/files_trashbin/lib/Trash/TrashManager.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_trashbin/lib/Trash/TrashManager.php b/apps/files_trashbin/lib/Trash/TrashManager.php index 50ab539c210..b81685efa25 100644 --- a/apps/files_trashbin/lib/Trash/TrashManager.php +++ b/apps/files_trashbin/lib/Trash/TrashManager.php @@ -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; } |