diff options
author | Joas Schilling <coding@schilljs.com> | 2020-10-21 13:37:56 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-10-21 13:37:56 +0200 |
commit | c1834bac7d39dbae43277857f6c5ae8cada891d7 (patch) | |
tree | b4eb1158a55e80cb6d288f68f6f3568d07b444e1 /lib/private | |
parent | 38bb40cffa6f0302efa134a347bd876e257495c1 (diff) | |
download | nextcloud-server-c1834bac7d39dbae43277857f6c5ae8cada891d7.tar.gz nextcloud-server-c1834bac7d39dbae43277857f6c5ae8cada891d7.zip |
Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/legacy/OC_Helper.php | 6 |
1 files changed, 5 insertions, 1 deletions
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, |