diff options
Diffstat (limited to 'lib/private/files/storage/dav.php')
-rw-r--r-- | lib/private/files/storage/dav.php | 9 |
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') { |