]> source.dussan.org Git - nextcloud-server.git/commitdiff
Use name of ICollection for exception message
authorMorris Jobke <hey@morrisjobke.de>
Wed, 16 Dec 2015 13:44:28 +0000 (14:44 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Wed, 16 Dec 2015 13:44:28 +0000 (14:44 +0100)
* fixes #21230

apps/dav/lib/connector/sabre/objecttree.php

index 2e9c1b9916c4ed4aa3d0ef3161addd858fda8da9..809d202aea44bbab54bb6a579285ec7222651971 100644 (file)
@@ -190,7 +190,7 @@ class ObjectTree extends \Sabre\DAV\Tree {
                $targetNodeExists = $this->nodeExists($destinationPath);
                $sourceNode = $this->getNodeForPath($sourcePath);
                if ($sourceNode instanceof \Sabre\DAV\ICollection && $targetNodeExists) {
-                       throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode . ', target exists');
+                       throw new \Sabre\DAV\Exception\Forbidden('Could not copy directory ' . $sourceNode->getName() . ', target exists');
                }
                list($sourceDir,) = \Sabre\HTTP\URLUtil::splitPath($sourcePath);
                list($destinationDir,) = \Sabre\HTTP\URLUtil::splitPath($destinationPath);