From 3f63f4b6b13a358e13a0c5ebd2f85b918b8c410f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 13 Oct 2014 13:14:07 +0200 Subject: [PATCH 1/2] Only mount the storages for the user once --- lib/private/files/filesystem.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index cdbbbf3d3c..51a241a4e3 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -45,6 +45,7 @@ class Filesystem { */ static private $defaultInstance; + static private $usersSetup = array(); /** * classname which used for hooks handling @@ -321,7 +322,10 @@ class Filesystem { if ($user == '') { $user = \OC_User::getUser(); } - $parser = new \OC\ArrayParser(); + if (isset(self::$usersSetup[$user])) { + return; + } + self::$usersSetup[$user] = true; $root = \OC_User::getHome($user); From 2974d4d3809c75eb3f69474b892fbc12fbe691c9 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 28 Oct 2014 15:13:29 +0100 Subject: [PATCH 2/2] Reset the users setup after clearing mounts --- lib/private/files/filesystem.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 51a241a4e3..c7dc99c55c 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -431,6 +431,7 @@ class Filesystem { */ public static function clearMounts() { if (self::$mounts) { + self::$usersSetup = array(); self::$mounts->clear(); } }