aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2020-11-16 11:46:22 +0100
committerGitHub <noreply@github.com>2020-11-16 11:46:22 +0100
commitd0f738fd595abc6449e96b4acc06a74905560091 (patch)
treee8c19b0696480d52a628c9277772693afad554c0
parent17034866f5e0f995d9c46fdec3ddf001d64e3c19 (diff)
parent2143f2bb8207fe569efb570993f7085b0154b2ff (diff)
downloadnextcloud-server-d0f738fd595abc6449e96b4acc06a74905560091.tar.gz
nextcloud-server-d0f738fd595abc6449e96b4acc06a74905560091.zip
Merge pull request #24112 from nextcloud/bugfix/24099/setup-fs-before-query-storage-in-settings
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 7c5a20dc35e..06ea440afab 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