summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/dav.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-20 13:35:23 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-24 15:11:54 +0100
commitae36c01b959d1cbdaeabb46d30cb416aae428a88 (patch)
tree8a7e577b3565d20ab1a14896e6cf0bd05054e119 /lib/private/files/storage/dav.php
parenteacb24c1518ca80871447fbb500f093a0c280ee6 (diff)
downloadnextcloud-server-ae36c01b959d1cbdaeabb46d30cb416aae428a88.tar.gz
nextcloud-server-ae36c01b959d1cbdaeabb46d30cb416aae428a88.zip
Adjust sabre changes in core
Diffstat (limited to 'lib/private/files/storage/dav.php')
-rw-r--r--lib/private/files/storage/dav.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php
index dcde7b8029b..9147f572461 100644
--- a/lib/private/files/storage/dav.php
+++ b/lib/private/files/storage/dav.php
@@ -47,6 +47,7 @@ use OCP\Files\StorageNotAvailableException;
use OCP\Util;
use Sabre\DAV\Client;
use Sabre\DAV\Exception\NotFound;
+use Sabre\DAV\Xml\Property\ResourceType;
use Sabre\HTTP\ClientException;
use Sabre\HTTP\ClientHttpException;
@@ -137,7 +138,7 @@ class DAV extends Common {
$this->client->setThrowExceptions(true);
if ($this->secure === true && $this->certPath) {
- $this->client->addTrustedCertificates($this->certPath);
+ $this->client->addCurlSetting(CURLOPT_CAINFO, $this->certPath);
}
}
@@ -280,7 +281,8 @@ class DAV extends Common {
$response = $this->propfind($path);
$responseType = array();
if (isset($response["{DAV:}resourcetype"])) {
- $responseType = $response["{DAV:}resourcetype"]->resourceType;
+ /** @var ResourceType[] $response */
+ $responseType = $response["{DAV:}resourcetype"]->getValue();
}
return (count($responseType) > 0 and $responseType[0] == "{DAV:}collection") ? 'dir' : 'file';
} catch (ClientHttpException $e) {
@@ -554,7 +556,8 @@ class DAV extends Common {
$response = $this->propfind($path);
$responseType = array();
if (isset($response["{DAV:}resourcetype"])) {
- $responseType = $response["{DAV:}resourcetype"]->resourceType;
+ /** @var ResourceType[] $response */
+ $responseType = $response["{DAV:}resourcetype"]->getValue();
}
$type = (count($responseType) > 0 and $responseType[0] == "{DAV:}collection") ? 'dir' : 'file';
if ($type == 'dir') {