Skip to content
Snippets Groups Projects
Commit 55658e7b authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #11539 from owncloud/mount-setup-once

Only mount the storages for the user once
parents a9b41cbf 2974d4d3
No related branches found
No related tags found
No related merge requests found
...@@ -45,6 +45,7 @@ class Filesystem { ...@@ -45,6 +45,7 @@ class Filesystem {
*/ */
static private $defaultInstance; static private $defaultInstance;
static private $usersSetup = array();
/** /**
* classname which used for hooks handling * classname which used for hooks handling
...@@ -321,7 +322,10 @@ class Filesystem { ...@@ -321,7 +322,10 @@ class Filesystem {
if ($user == '') { if ($user == '') {
$user = \OC_User::getUser(); $user = \OC_User::getUser();
} }
$parser = new \OC\ArrayParser(); if (isset(self::$usersSetup[$user])) {
return;
}
self::$usersSetup[$user] = true;
$root = \OC_User::getHome($user); $root = \OC_User::getHome($user);
...@@ -427,6 +431,7 @@ class Filesystem { ...@@ -427,6 +431,7 @@ class Filesystem {
*/ */
public static function clearMounts() { public static function clearMounts() {
if (self::$mounts) { if (self::$mounts) {
self::$usersSetup = array();
self::$mounts->clear(); self::$mounts->clear();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment