Merge pull request #24112 from nextcloud/bugfix/24099/setup-fs-before-query-storage-in-settings
Set up FS before querying storage info in settings
This commit is contained in:
commit
d0f738fd59
|
@ -105,6 +105,9 @@ class PersonalInfo implements ISettings {
|
||||||
$user = $this->userManager->get($uid);
|
$user = $this->userManager->get($uid);
|
||||||
$userData = $this->accountManager->getUser($user);
|
$userData = $this->accountManager->getUser($user);
|
||||||
|
|
||||||
|
// make sure FS is setup before querying storage related stuff...
|
||||||
|
\OC_Util::setupFS($user->getUID());
|
||||||
|
|
||||||
$storageInfo = \OC_Helper::getStorageInfo('/');
|
$storageInfo = \OC_Helper::getStorageInfo('/');
|
||||||
if ($storageInfo['quota'] === FileInfo::SPACE_UNLIMITED) {
|
if ($storageInfo['quota'] === FileInfo::SPACE_UNLIMITED) {
|
||||||
$totalSpace = $this->l->t('Unlimited');
|
$totalSpace = $this->l->t('Unlimited');
|
||||||
|
|
|
@ -475,6 +475,9 @@ class OC_Helper {
|
||||||
/**
|
/**
|
||||||
* Calculate the disc space for the given path
|
* Calculate the disc space for the given path
|
||||||
*
|
*
|
||||||
|
* BEWARE: this requires that Util::setupFS() was called
|
||||||
|
* already !
|
||||||
|
*
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param \OCP\Files\FileInfo $rootInfo (optional)
|
* @param \OCP\Files\FileInfo $rootInfo (optional)
|
||||||
* @return array
|
* @return array
|
||||||
|
|
Loading…
Reference in New Issue