summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-11-09 11:03:25 +0100
committerGitHub <noreply@github.com>2020-11-09 11:03:25 +0100
commit28464f71a22623b6e4c542a58a124b4eb8527aad (patch)
treeec64a8ec8b92a056da9c896354192e194236943a /lib
parent005a132938556a238d3b3a617fc5a11dedbba24e (diff)
parent6a453ac184f42cae7fca5dc5e6913e32594b709b (diff)
downloadnextcloud-server-28464f71a22623b6e4c542a58a124b4eb8527aad.tar.gz
nextcloud-server-28464f71a22623b6e4c542a58a124b4eb8527aad.zip
Merge pull request #23982 from nextcloud/fix/quota-storage-getsize
Make sure root storage is valid before checking its size
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Wrapper/Quota.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Quota.php b/lib/private/Files/Storage/Wrapper/Quota.php
index 4b99af46b02..406f0fd4649 100644
--- a/lib/private/Files/Storage/Wrapper/Quota.php
+++ b/lib/private/Files/Storage/Wrapper/Quota.php
@@ -71,7 +71,10 @@ class Quota extends Wrapper {
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();