summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-31 13:23:23 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-31 13:23:23 +0100
commit1e2e5abe268c501c38c1d776d4cddb076ab24110 (patch)
tree89b83b7f57be5e63ba4ed59693f9558844f02b74 /apps/files_external
parent65784227d6460a9464b287cc698d3e0a54f6d0d3 (diff)
downloadnextcloud-server-1e2e5abe268c501c38c1d776d4cddb076ab24110.tar.gz
nextcloud-server-1e2e5abe268c501c38c1d776d4cddb076ab24110.zip
Allow an empty mount point
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/service/storagesservice.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/service/storagesservice.php b/apps/files_external/service/storagesservice.php
index 947e544d88f..703f277d84e 100644
--- a/apps/files_external/service/storagesservice.php
+++ b/apps/files_external/service/storagesservice.php
@@ -172,7 +172,7 @@ abstract class StoragesService {
// the root mount point is in the format "/$user/files/the/mount/point"
// we remove the "/$user/files" prefix
- $parts = explode('/', trim($rootMountPath, '/'), 3);
+ $parts = explode('/', ltrim($rootMountPath, '/'), 3);
if (count($parts) < 3) {
// something went wrong, skip
\OCP\Util::writeLog(
@@ -183,7 +183,7 @@ abstract class StoragesService {
continue;
}
- $relativeMountPath = $parts[2];
+ $relativeMountPath = rtrim($parts[2], '/');
// note: we cannot do this after the loop because the decrypted config
// options might be needed for the config hash