From 48d843858de095e83105f55d6b994ad41939f5d4 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Sat, 31 Oct 2020 15:10:48 +0100 Subject: [PATCH 1/2] Do not setup the default FS on normal routes This should help with load times hopefully. Only initialize the FS if we actually ned it. Signed-off-by: Roeland Jago Douma --- apps/files/lib/Controller/ViewController.php | 1 + lib/base.php | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index c5ff6eff19..4a45657497 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -134,6 +134,7 @@ class ViewController extends Controller { * @throws \OCP\Files\NotFoundException */ protected function getStorageInfo() { + \OC_Util::setupFS(); $dirInfo = \OC\Files\Filesystem::getFileInfo('/', false); return \OC_Helper::getStorageInfo('/', $dirInfo); diff --git a/lib/base.php b/lib/base.php index 0213fa9e9e..9c914f1543 100644 --- a/lib/base.php +++ b/lib/base.php @@ -1006,7 +1006,6 @@ class OC { OC_App::loadApps(['filesystem', 'logging']); OC_App::loadApps(); } - OC_Util::setupFS(); OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo()); return; } catch (Symfony\Component\Routing\Exception\ResourceNotFoundException $e) { From 448044d83163a27d0a07f1067f5b4aeffe2d0ba9 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 6 Nov 2020 09:03:20 +0100 Subject: [PATCH 2/2] Fix getstorage call Signed-off-by: Roeland Jago Douma --- apps/files/lib/Controller/AjaxController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/files/lib/Controller/AjaxController.php b/apps/files/lib/Controller/AjaxController.php index 52b774915e..51a4a5b2a3 100644 --- a/apps/files/lib/Controller/AjaxController.php +++ b/apps/files/lib/Controller/AjaxController.php @@ -41,6 +41,7 @@ class AjaxController extends Controller { * @NoAdminRequired */ public function getStorageStats(string $dir = '/'): JSONResponse { + \OC_Util::setupFS(); try { return new JSONResponse([ 'status' => 'success',