summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2019-03-14 15:40:21 +0100
committerBackportbot <backportbot-noreply@rullzer.com>2019-03-14 19:28:58 +0000
commit19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc (patch)
tree35dadec668eb41506618a35cf16459b9afec2106 /apps/dav
parent92634ec842eb860dcb9e48bc2fe2d6e734dae145 (diff)
downloadnextcloud-server-19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc.tar.gz
nextcloud-server-19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc.zip
throw a proper error if rename fails in dav
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-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 38d0ff57fb2..92f1f98acc5 100644
--- a/apps/dav/lib/Connector/Sabre/Node.php
+++ b/apps/dav/lib/Connector/Sabre/Node.php
@@ -136,7 +136,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;