summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-10-21 13:37:56 +0200
committerMorris Jobke <hey@morrisjobke.de>2020-11-12 20:27:49 +0100
commite29eb55f8b709c420689571964dae8e36b18fa37 (patch)
treef05d55655978a0ba91412d493a9f768c642d8c4a
parent16554001839b08f9b68e869495953fbb6f27950d (diff)
downloadnextcloud-server-e29eb55f8b709c420689571964dae8e36b18fa37.tar.gz
nextcloud-server-e29eb55f8b709c420689571964dae8e36b18fa37.zip
Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--lib/private/legacy/helper.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index 387999a96da..ae933421bce 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -544,7 +544,11 @@ class OC_Helper {
if($owner) {
$ownerDisplayName = $owner->getDisplayName();
}
- [,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
+ if (substr_count($mount->getMountPoint(), '/') < 3) {
+ $mountPoint = '';
+ } else {
+ [,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
+ }
return [
'free' => $free,