diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-25 14:34:47 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-06-18 12:53:19 +0200 |
commit | 3c66a8c8ed7113754a8e7f449a1a51bb08192b1a (patch) | |
tree | d8a335439ec70653e28eae45cb51ceab3c37a804 /lib/private/files | |
parent | a921ad89259f1d580292d649a58160fab7a2a2d7 (diff) | |
download | nextcloud-server-3c66a8c8ed7113754a8e7f449a1a51bb08192b1a.tar.gz nextcloud-server-3c66a8c8ed7113754a8e7f449a1a51bb08192b1a.zip |
allow configuring objectstore as home and root storage
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/filesystem.php | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index 2cc4a2130eb..f1f076a297b 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -325,13 +325,22 @@ class Filesystem { $userObject = \OC_User::getManager()->get($user); if (!is_null($userObject)) { + $homeStorage = \OC_Config::getValue( 'home_storage', array( + 'class' => '\OC\Files\Storage\Home', + 'arguments' => array() + )); + if (empty($config['class'])) { + //FIXME log error? or fallback to '\OC\Files\Storage\Home'? + } + if (!isset($config['arguments'])) { + $config['arguments'] = array(); + } + $homeStorage['arguments']['user'] = $userObject; // check for legacy home id (<= 5.0.12) if (\OC\Files\Cache\Storage::exists('local::' . $root . '/')) { - self::mount('\OC\Files\Storage\Home', array('user' => $userObject, 'legacy' => true), $user); - } - else { - self::mount('\OC\Files\Storage\Home', array('user' => $userObject), $user); + $homeStorage['arguments']['legacy'] = true; } + self::mount($homeStorage['class'], $homeStorage['arguments'], $user); } else { self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user); |