From: Joas Schilling Date: Wed, 21 Oct 2020 11:37:56 +0000 (+0200) Subject: Only use index of mount point when it is there X-Git-Tag: v20.0.2RC1~79^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2160dc958379264e4318d4da9d31d6977b0e1eb0;p=nextcloud-server.git Only use index of mount point when it is there Signed-off-by: Joas Schilling --- diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php index 8a38ca3b0d2..0d39a82e510 100644 --- a/lib/private/legacy/OC_Helper.php +++ b/lib/private/legacy/OC_Helper.php @@ -545,7 +545,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,