]> source.dussan.org Git - nextcloud-server.git/commitdiff
remove explicit setup when getting storage info 36608/head
authorRobin Appelman <robin@icewind.nl>
Wed, 8 Feb 2023 12:47:55 +0000 (13:47 +0100)
committerRobin Appelman <robin@icewind.nl>
Wed, 8 Feb 2023 12:47:55 +0000 (13:47 +0100)
the implicit setup gets enough data without having to do a full setup.

Saves having to do a full fs setup for the files webui template

Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files/lib/Controller/ViewController.php

index b607764e602fb699302a4dea1f5a17c9ee851cd2..5133661d725610a7f89884a231aa3e69ef9407e8 100644 (file)
@@ -137,7 +137,6 @@ class ViewController extends Controller {
         * @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);
@@ -190,10 +189,6 @@ class ViewController extends Controller {
                \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