summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2020-11-13 16:52:08 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-11-16 11:06:35 +0000
commit32758894a4ca492ce069c69af6fcf98b80809264 (patch)
tree65285e960a8ad7c80862fc9005f97330e88d4150 /apps
parent7a821da1bcfe0913afc5b5dcfdede75e4d89902c (diff)
downloadnextcloud-server-32758894a4ca492ce069c69af6fcf98b80809264.tar.gz
nextcloud-server-32758894a4ca492ce069c69af6fcf98b80809264.zip
Set up FS before querying storage info in settings
The personal info section of the personal settings is querying the storage quota information. For this it requires the FS to be setup which is not always guaranteed. This fixes an issue where refreshing the settings page would cause it to fail after Redis caches are full. It is likely that when Redis cache is populated, some code path is initializing the FS, so it works so far. But when the cache is populated, that code path is skipped so the FS is not guaranteed to be setup... Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Settings/Personal/PersonalInfo.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/settings/lib/Settings/Personal/PersonalInfo.php b/apps/settings/lib/Settings/Personal/PersonalInfo.php
index c4b505c4248..afadc3c775d 100644
--- a/apps/settings/lib/Settings/Personal/PersonalInfo.php
+++ b/apps/settings/lib/Settings/Personal/PersonalInfo.php
@@ -105,6 +105,9 @@ class PersonalInfo implements ISettings {
$user = $this->userManager->get($uid);
$userData = $this->accountManager->getUser($user);
+ // make sure FS is setup before querying storage related stuff...
+ \OC_Util::setupFS($user->getUID());
+
$storageInfo = \OC_Helper::getStorageInfo('/');
if ($storageInfo['quota'] === FileInfo::SPACE_UNLIMITED) {
$totalSpace = $this->l->t('Unlimited');