From e29eb55f8b709c420689571964dae8e36b18fa37 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 13:37:56 +0200 Subject: Only use index of mount point when it is there Signed-off-by: Joas Schilling --- lib/private/legacy/helper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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, -- cgit v1.2.3