only use one config option 'objectstore' for root and home storage configuration
This commit is contained in:
parent
7493ff0624
commit
4e65889f54
|
@ -325,14 +325,14 @@ class Filesystem {
|
||||||
$userObject = \OC_User::getManager()->get($user);
|
$userObject = \OC_User::getManager()->get($user);
|
||||||
|
|
||||||
if (!is_null($userObject)) {
|
if (!is_null($userObject)) {
|
||||||
$homeStorage = \OC_Config::getValue( 'home_storage', array(
|
$homeStorage = \OC_Config::getValue( 'objectstore', array(
|
||||||
//default home storage configuration:
|
//default home storage configuration:
|
||||||
'class' => '\OC\Files\Storage\Home',
|
'class' => '\OC\Files\Storage\Home',
|
||||||
'arguments' => array()
|
'arguments' => array()
|
||||||
));
|
));
|
||||||
// sanity checks
|
// sanity checks
|
||||||
if (empty($homeStorage['class'])) {
|
if (empty($homeStorage['class'])) {
|
||||||
\OCP\Util::writeLog('files', 'No class given for home_storage', \OCP\Util::ERROR);
|
\OCP\Util::writeLog('files', 'No class given for objectstore', \OCP\Util::ERROR);
|
||||||
}
|
}
|
||||||
if (!isset($homeStorage['arguments'])) {
|
if (!isset($homeStorage['arguments'])) {
|
||||||
$homeStorage['arguments'] = array();
|
$homeStorage['arguments'] = array();
|
||||||
|
|
|
@ -73,9 +73,9 @@ class OC_Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
//check if we are using an object storage
|
//check if we are using an object storage
|
||||||
$root_storage = OC_Config::getValue( 'root_storage' );
|
$objectStore = OC_Config::getValue( 'objectstore' );
|
||||||
if ( isset( $root_storage ) ) {
|
if ( isset( $objectStore ) ) {
|
||||||
self::initObjectStoreRootFS($root_storage);
|
self::initObjectStoreRootFS($objectStore);
|
||||||
} else {
|
} else {
|
||||||
self::initLocalStorageRootFS();
|
self::initLocalStorageRootFS();
|
||||||
}
|
}
|
||||||
|
@ -108,10 +108,8 @@ class OC_Util {
|
||||||
return $storage;
|
return $storage;
|
||||||
});
|
});
|
||||||
|
|
||||||
$userDir = '/'.$user.'/files';
|
|
||||||
|
|
||||||
// copy skeleton for local storage only
|
// copy skeleton for local storage only
|
||||||
if ( ! isset( $root_storage ) ) {
|
if ( ! isset( $objectStore ) ) {
|
||||||
$userRoot = OC_User::getHome($user);
|
$userRoot = OC_User::getHome($user);
|
||||||
$userDirectory = $userRoot . '/files';
|
$userDirectory = $userRoot . '/files';
|
||||||
if( !is_dir( $userDirectory )) {
|
if( !is_dir( $userDirectory )) {
|
||||||
|
@ -120,6 +118,8 @@ class OC_Util {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$userDir = '/'.$user.'/files';
|
||||||
|
|
||||||
//jail the user into his "home" directory
|
//jail the user into his "home" directory
|
||||||
\OC\Files\Filesystem::init($user, $userDir);
|
\OC\Files\Filesystem::init($user, $userDir);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue