diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-14 20:28:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-14 20:28:17 +0100 |
commit | 06c898cab48b8e05403b3acd1cc29162ea0fdc63 (patch) | |
tree | 2fcfa14ee7a9ecc89990d86e7daa8a592000d198 | |
parent | c7dd07966a3d8a9c3b44a3feaef4319df7bc9f2f (diff) | |
parent | dafbb421895ba9a1fc2aad6d37a994b8db46bfc3 (diff) | |
download | nextcloud-server-06c898cab48b8e05403b3acd1cc29162ea0fdc63.tar.gz nextcloud-server-06c898cab48b8e05403b3acd1cc29162ea0fdc63.zip |
Merge pull request #14690 from nextcloud/dav-rename-hande-failure
throw a proper error if rename fails in dav
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Node.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index 32ba6c53a0c..f0917fe11b2 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -138,7 +138,9 @@ abstract class Node implements \Sabre\DAV\INode { $newPath = $parentPath . '/' . $newName; - $this->fileView->rename($this->path, $newPath); + if (!$this->fileView->rename($this->path, $newPath)) { + throw new \Sabre\DAV\Exception('Failed to rename '. $this->path . ' to ' . $newPath); + } $this->path = $newPath; |