From dafbb421895ba9a1fc2aad6d37a994b8db46bfc3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 14 Mar 2019 15:40:21 +0100 Subject: throw a proper error if rename fails in dav Signed-off-by: Robin Appelman --- apps/dav/lib/Connector/Sabre/Node.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps') 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; -- cgit v1.2.3