Fix root path handling for WebDAV ext storage

Added missing cleanPath() call that converts "/" to "" when calling
SabreDAV. This is needed because SabreDAV will discard its base URL when
passing "/".
This commit is contained in:
Vincent Petry 2014-11-11 15:20:36 +01:00
parent 9368de5a8b
commit 4b943a4810
1 changed files with 2 additions and 0 deletions

View File

@ -433,6 +433,7 @@ class DAV extends \OC\Files\Storage\Common {
public function getPermissions($path) {
$this->init();
$path = $this->cleanPath($path);
$response = $this->client->propfind($this->encodePath($path), array('{http://owncloud.org/ns}permissions'));
if (isset($response['{http://owncloud.org/ns}permissions'])) {
return $this->parsePermissions($response['{http://owncloud.org/ns}permissions']);
@ -477,6 +478,7 @@ class DAV extends \OC\Files\Storage\Common {
*/
public function hasUpdated($path, $time) {
$this->init();
$path = $this->cleanPath($path);
try {
$response = $this->client->propfind($this->encodePath($path), array(
'{DAV:}getlastmodified',