diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index 32ba6c53a0ca4..f0917fe11b2db 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -138,7 +138,9 @@ public function setName($name) { $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;