Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-03-14 17:40:21 +0300
committerRobin Appelman <robin@icewind.nl>2019-03-14 17:40:21 +0300
commitdafbb421895ba9a1fc2aad6d37a994b8db46bfc3 (patch)
tree2630ff8fbb22829fc0176ace37f3c36a8fd3e4a3 /apps
parent762a8bb3d9521a9f75d9e186150cb77241b3bc19 (diff)
throw a proper error if rename fails in dav
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/Node.php4
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;