]> source.dussan.org Git - nextcloud-server.git/commitdiff
Make sure root storage is valid before checking its size 23996/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Sat, 7 Nov 2020 23:10:06 +0000 (00:10 +0100)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Mon, 9 Nov 2020 10:05:54 +0000 (10:05 +0000)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
lib/private/Files/Storage/Wrapper/Quota.php

index 4b99af46b0294e85c505a76674e1a104c2d7eef3..406f0fd46492741d2ac9f5ad52c1e2c5df2f8ef1 100644 (file)
@@ -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();