fix fallback config for default home storage

This commit is contained in:
Jörn Friedrich Dreyer 2014-06-11 14:39:27 +02:00
parent f1bf1326b1
commit 1374ba9adf
1 changed files with 6 additions and 4 deletions

View File

@ -326,14 +326,16 @@ class Filesystem {
if (!is_null($userObject)) {
$homeStorage = \OC_Config::getValue( 'home_storage', array(
//default home storage configuration:
'class' => '\OC\Files\Storage\Home',
'arguments' => array()
));
if (empty($config['class'])) {
//FIXME log error? or fallback to '\OC\Files\Storage\Home'?
// sanity checks
if (empty($homeStorage['class'])) {
\OCP\Util::writeLog('files', 'No class given for home_storage', \OCP\Util::ERROR);
}
if (!isset($config['arguments'])) {
$config['arguments'] = array();
if (!isset($homeStorage['arguments'])) {
$homeStorage['arguments'] = array();
}
$homeStorage['arguments']['user'] = $userObject;
// check for legacy home id (<= 5.0.12)