diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-15 10:53:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-15 10:53:40 +0100 |
commit | b42e4b19ee758cba63782f35ac260049918146c2 (patch) | |
tree | a190a0e599ac20e4f81eef63eec9541b201362e4 | |
parent | 7cf35f4a56ef091ec22e0a680d0004d4b9115014 (diff) | |
parent | 19a3ac67a719e3e71fabdffe8921dbbd9ffc22fc (diff) | |
download | nextcloud-server-b42e4b19ee758cba63782f35ac260049918146c2.tar.gz nextcloud-server-b42e4b19ee758cba63782f35ac260049918146c2.zip |
Merge pull request #14700 from nextcloud/backport/14690/stable15
[stable15] throw a proper error if rename fails in 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; |