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

Only mount the storages for the user once
This commit is contained in:
Vincent Petry 2014-10-31 10:42:29 +01:00
commit 55658e7bb2
1 changed files with 6 additions and 1 deletions

View File

@ -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);
@ -427,6 +431,7 @@ class Filesystem {
*/
public static function clearMounts() {
if (self::$mounts) {
self::$usersSetup = array();
self::$mounts->clear();
}
}