diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2020-11-08 00:10:06 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-11-09 10:08:17 +0000 |
commit | 40a2cf96befc1f6a010bfb3c0a0a941cf2648f26 (patch) | |
tree | 81f44036a0fc25698f49d747c3f7bf2b4cfb7522 | |
parent | b516a58acf5d5a694fd7ea48a7b37e194db48b91 (diff) | |
download | nextcloud-server-40a2cf96befc1f6a010bfb3c0a0a941cf2648f26.tar.gz nextcloud-server-40a2cf96befc1f6a010bfb3c0a0a941cf2648f26.zip |
Make sure root storage is valid before checking its size
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Quota.php | 5 |
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 62d3335987c..3fafa98051d 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(); |