*/
private static $tmpFiles = array();
+ public function __construct($params) {
+ if (isset($params['user']) && is_object($params['user'])) {
+ $this->user = $params['user'];
+ } else {
+ $this->user = null;
+ }
+ //initialize cache with root directory in cache
+ if ( ! $this->is_dir('/') ) {
+ $this->mkdir('/');
+ }
+ }
+
/**
* @param string $path
* @return \OC\Files\Cache\Cache
return 'objstore::root';
}
- public function __construct($params) {
- if (isset($params['user']) && is_object($params['user'])) {
- $this->user = $params['user'];
- } else {
- $this->user = null;
- }
- }
-
public function mkdir($path) {
$path = $this->normalizePath($path);
$userDir = '/'.$user.'/files';
- //autocreate users "home" directory
- if ( isset( $root_storage ) ) {
- $root = \OC\Files\Filesystem::getStorage('/');
- if ( $root->instanceOfStorage('\OC\Files\ObjectStore\AbstractObjectStore') ) {
- //initialize cache with root directory in cache
- if ( ! $root->is_dir('/') ) {
- $root->mkdir('/');
- }
- }
- } else {
- //copy skeleton for local storage only
+ // copy skeleton for local storage only
+ if ( ! isset( $root_storage ) ) {
$userRoot = OC_User::getHome($user);
$userDirectory = $userRoot . '/files';
if( !is_dir( $userDirectory )) {
\OC_App::disable('files_sharing');
\OC_App::disable('files_versions');
- \OC_App::enable('objectstore');
// reset backend
\OC_User::clearBackends();