summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-11-08 00:10:06 +0100
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2020-11-09 08:49:30 +0100
commit6a453ac184f42cae7fca5dc5e6913e32594b709b (patch)
tree46899d678ec339dc7b63057db657b44cc41d1db8 /lib
parenta5fa9604babdab101357016066ed72b4fcab1d21 (diff)
downloadnextcloud-server-6a453ac184f42cae7fca5dc5e6913e32594b709b.tar.gz
nextcloud-server-6a453ac184f42cae7fca5dc5e6913e32594b709b.zip
Make sure root storage is valid before checking its size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
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();