]> source.dussan.org Git - nextcloud-server.git/commitdiff
Only use index of mount point when it is there 23611/head
authorJoas Schilling <coding@schilljs.com>
Wed, 21 Oct 2020 11:37:56 +0000 (13:37 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Wed, 21 Oct 2020 18:46:13 +0000 (18:46 +0000)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/legacy/OC_Helper.php

index 8a38ca3b0d294de57bb194d763233a516dc5ceb0..0d39a82e510cac7a02b083974c143096d22749ae 100644 (file)
@@ -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,