Skip to content

Commit 58d24b7

Browse files
authored
Merge pull request #23606 from nextcloud/bugfix/22913/only-use-index-when-it-exists
Only use index of mount point when it is there
2 parents 38bb40c + c1834ba commit 58d24b7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/private/legacy/OC_Helper.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,11 @@ public static function getStorageInfo($path, $rootInfo = null) {
545545
if ($owner) {
546546
$ownerDisplayName = $owner->getDisplayName();
547547
}
548-
[,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
548+
if (substr_count($mount->getMountPoint(), '/') < 3) {
549+
$mountPoint = '';
550+
} else {
551+
[,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
552+
}
549553

550554
return [
551555
'free' => $free,

0 commit comments

Comments
 (0)