]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix root path handling for WebDAV ext storage
authorVincent Petry <pvince81@owncloud.com>
Tue, 11 Nov 2014 14:20:36 +0000 (15:20 +0100)
committerVincent Petry <pvince81@owncloud.com>
Tue, 11 Nov 2014 14:20:36 +0000 (15:20 +0100)
Added missing cleanPath() call that converts "/" to "" when calling
SabreDAV. This is needed because SabreDAV will discard its base URL when
passing "/".

lib/private/files/storage/dav.php

index 7f53704e94f7d142f0218955ceb2d77f48aab367..26fa69408a8cb209b930ad5ce52318bdfb17f241 100644 (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',