From 2160dc958379264e4318d4da9d31d6977b0e1eb0 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 21 Oct 2020 13:37:56 +0200 Subject: [PATCH] Only use index of mount point when it is there Signed-off-by: Joas Schilling --- lib/private/legacy/OC_Helper.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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, -- 2.39.5