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:
authorMorris Jobke <hey@morrisjobke.de>2019-03-14 22:28:17 +0300
committerGitHub <noreply@github.com>2019-03-14 22:28:17 +0300
commit06c898cab48b8e05403b3acd1cc29162ea0fdc63 (patch)
tree2fcfa14ee7a9ecc89990d86e7daa8a592000d198 /apps
parentc7dd07966a3d8a9c3b44a3feaef4319df7bc9f2f (diff)
parentdafbb421895ba9a1fc2aad6d37a994b8db46bfc3 (diff)
Merge pull request #14690 from nextcloud/dav-rename-hande-failure
throw a proper error if rename fails in dav
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;