summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/owncloud.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/lib/owncloud.php')
-rw-r--r--apps/files_external/lib/owncloud.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/owncloud.php b/apps/files_external/lib/owncloud.php
index 04a1e959eb0..7d452e8ff4d 100644
--- a/apps/files_external/lib/owncloud.php
+++ b/apps/files_external/lib/owncloud.php
@@ -37,13 +37,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;
}
}