Only use index of mount point when it is there
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
36070d70d7
commit
2160dc9583
|
@ -545,7 +545,11 @@ class OC_Helper {
|
||||||
if ($owner) {
|
if ($owner) {
|
||||||
$ownerDisplayName = $owner->getDisplayName();
|
$ownerDisplayName = $owner->getDisplayName();
|
||||||
}
|
}
|
||||||
[,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
|
if (substr_count($mount->getMountPoint(), '/') < 3) {
|
||||||
|
$mountPoint = '';
|
||||||
|
} else {
|
||||||
|
[,,,$mountPoint] = explode('/', $mount->getMountPoint(), 4);
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'free' => $free,
|
'free' => $free,
|
||||||
|
|
Loading…
Reference in New Issue