summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/external/storage.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/external/storage.php')
-rw-r--r--apps/files_sharing/lib/external/storage.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_sharing/lib/external/storage.php b/apps/files_sharing/lib/external/storage.php
index cd04841bb09..2771f974614 100644
--- a/apps/files_sharing/lib/external/storage.php
+++ b/apps/files_sharing/lib/external/storage.php
@@ -37,9 +37,9 @@ class Storage extends DAV implements ISharedStorage {
$this->remote = $options['remote'];
$this->remoteUser = $options['owner'];
list($protocol, $remote) = explode('://', $this->remote);
- list($host, $root) = explode('/', $remote);
+ list($host, $root) = explode('/', $remote, 2);
$secure = $protocol === 'https';
- $root .= '/public.php/webdav';
+ $root = rtrim($root, '/') . '/public.php/webdav';
$this->mountPoint = $options['mountpoint'];
$this->token = $options['token'];
parent::__construct(array(