Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Make sure root storage is valid before checking its size
Signed-off-by: John Molakvoæ (skjnldsv) <[email protected]>
  • Loading branch information
skjnldsv authored and backportbot[bot] committed Nov 9, 2020
commit 40a2cf96befc1f6a010bfb3c0a0a941cf2648f26
5 changes: 4 additions & 1 deletion lib/private/Files/Storage/Wrapper/Quota.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ public function getQuota() {
protected function getSize($path, $storage = null) {
if ($this->config->getValue('quota_include_external_storage', false)) {
$rootInfo = Filesystem::getFileInfo('', 'ext');
return $rootInfo->getSize(true);
if ($rootInfo) {
return $rootInfo->getSize(true);
}
return \OCP\Files\FileInfo::SPACE_NOT_COMPUTED;
} else {
if (is_null($storage)) {
$cache = $this->getCache();
Expand Down