summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-11-16 14:14:43 +0100
committerGitHub <noreply@github.com>2020-11-16 14:14:43 +0100
commitb14ec966c1d229e05f6fc0ecbe23d871afcc4392 (patch)
treea66f60c28a6c3c93088c257670e3a20b4b03341e
parentf4d92d2e3a1d631b52238026ba2fddd05244b5b1 (diff)
parent32758894a4ca492ce069c69af6fcf98b80809264 (diff)
downloadnextcloud-server-b14ec966c1d229e05f6fc0ecbe23d871afcc4392.tar.gz
nextcloud-server-b14ec966c1d229e05f6fc0ecbe23d871afcc4392.zip
Merge pull request #24156 from nextcloud/backport/24112/stable20
[stable20] Set up FS before querying storage info in settings
-rw-r--r--apps/settings/lib/Settings/Personal/PersonalInfo.php3
-rw-r--r--lib/private/legacy/OC_Helper.php3
2 files changed, 6 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');
diff --git a/lib/private/legacy/OC_Helper.php b/lib/private/legacy/OC_Helper.php
index 0d39a82e510..44fbdffc092 100644
--- a/lib/private/legacy/OC_Helper.php
+++ b/lib/private/legacy/OC_Helper.php
@@ -475,6 +475,9 @@ class OC_Helper {
/**
* Calculate the disc space for the given path
*
+ * BEWARE: this requires that Util::setupFS() was called
+ * already !
+ *
* @param string $path
* @param \OCP\Files\FileInfo $rootInfo (optional)
* @return array