]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix fallback config for default home storage
authorJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 11 Jun 2014 12:39:27 +0000 (14:39 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Wed, 18 Jun 2014 10:53:20 +0000 (12:53 +0200)
lib/private/files/filesystem.php

index f1f076a297bc87b9a64e84f2a670635c3220046b..5fb345c87f8c7da4ea40c191a1ce4183e341f805 100644 (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)