Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-10-21 14:37:56 +0300
committerMorris Jobke <hey@morrisjobke.de>2020-11-12 22:27:49 +0300
commite29eb55f8b709c420689571964dae8e36b18fa37 (patch)
treef05d55655978a0ba91412d493a9f768c642d8c4a /lib
parent16554001839b08f9b68e869495953fbb6f27950d (diff)
Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-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,