Skip to content
Snippets Groups Projects
Commit edfeb05a authored by Robin McCorkell's avatar Robin McCorkell
Browse files

Fix bugs in ownCloud external storage

parent 09a06e4f
No related branches found
No related tags found
No related merge requests found
......@@ -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/',
),
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment