Commit edfeb05a authored by Robin McCorkell's avatar Robin McCorkell
Browse files

Fix bugs in ownCloud external storage

parent 09a06e4f
......@@ -49,13 +49,13 @@ class OwnCloud extends \OC\Files\Storage\DAV{
$host = substr($host, 0, $hostSlashPos);
}
if (substr($contextPath , 1) !== '/'){
if (substr($contextPath, -1) !== '/'){
$contextPath .= '/';
}
if (isset($params['root'])){
$root = $params['root'];
if (substr($root, 1) !== '/'){
if (substr($root, 0, 1) !== '/'){
$root = '/' . $root;
}
}
......
......@@ -81,6 +81,14 @@ class OwnCloudFunctions extends \Test\TestCase {
),
'http://testhost/testroot/remote.php/webdav/subdir/',
),
array(
array(
'host' => 'http://testhost/testroot/',
'root' => '/subdir',
'secure' => false
),
'http://testhost/testroot/remote.php/webdav/subdir/',
),
);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment