diff options
author | Robin Appelman <robin@icewind.nl> | 2019-03-14 15:40:21 +0100 |
---|---|---|
committer | Backportbot <backportbot-noreply@rullzer.com> | 2019-03-14 19:28:58 +0000 |
commit | 19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc (patch) | |
tree | 35dadec668eb41506618a35cf16459b9afec2106 /apps/dav | |
parent | 92634ec842eb860dcb9e48bc2fe2d6e734dae145 (diff) | |
download | nextcloud-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.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 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; |