Make sure root storage is valid before checking its size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
b516a58acf
commit
40a2cf96be
|
@ -71,7 +71,10 @@ class Quota extends Wrapper {
|
||||||
protected function getSize($path, $storage = null) {
|
protected function getSize($path, $storage = null) {
|
||||||
if ($this->config->getValue('quota_include_external_storage', false)) {
|
if ($this->config->getValue('quota_include_external_storage', false)) {
|
||||||
$rootInfo = Filesystem::getFileInfo('', 'ext');
|
$rootInfo = Filesystem::getFileInfo('', 'ext');
|
||||||
return $rootInfo->getSize(true);
|
if ($rootInfo) {
|
||||||
|
return $rootInfo->getSize(true);
|
||||||
|
}
|
||||||
|
return \OCP\Files\FileInfo::SPACE_NOT_COMPUTED;
|
||||||
} else {
|
} else {
|
||||||
if (is_null($storage)) {
|
if (is_null($storage)) {
|
||||||
$cache = $this->getCache();
|
$cache = $this->getCache();
|
||||||
|
|
Loading…
Reference in New Issue