Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove explicit setup when getting storage info #36608

Merged
merged 1 commit into from Feb 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 0 additions & 5 deletions apps/files/lib/Controller/ViewController.php
Expand Up @@ -137,7 +137,6 @@ protected function renderScript($appName, $scriptName) {
* @throws \OCP\Files\NotFoundException
*/
protected function getStorageInfo(string $dir = '/') {
\OC_Util::setupFS();
$rootInfo = \OC\Files\Filesystem::getFileInfo('/', false);

return \OC_Helper::getStorageInfo($dir, $rootInfo ?: null);
Expand Down Expand Up @@ -190,10 +189,6 @@ public function index($dir = '', $view = '', $fileid = null, $fileNotFound = fal
\OCP\Util::addScript('files', 'merged-index', 'files');
\OCP\Util::addScript('files', 'main');

// mostly for the home storage's free space
// FIXME: Make non static
$storageInfo = $this->getStorageInfo();

$userId = $this->userSession->getUser()->getUID();

// Get all the user favorites to create a submenu
Expand Down