aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/util.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-06-13 13:26:09 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-06-18 12:53:20 +0200
commit10de4a7b904fe472a240dd4d35d83daa919e6a1e (patch)
tree7a0e701d8a96c63b666f5e586d00d23d727fb75a /lib/private/util.php
parent652af71ba98461d3ed061c6e1daa56549d1dfac5 (diff)
downloadnextcloud-server-10de4a7b904fe472a240dd4d35d83daa919e6a1e.tar.gz
nextcloud-server-10de4a7b904fe472a240dd4d35d83daa919e6a1e.zip
move creation of / and users 'files' from storage constructor to setupFS / mount initialization
Diffstat (limited to 'lib/private/util.php')
-rwxr-xr-xlib/private/util.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index c2db9e5773e..435a2914555 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -110,8 +110,17 @@ class OC_Util {
$userDir = '/'.$user.'/files';
- //autocreate users "home" directory for local storage only
- if ( ! isset( $root_storage ) ) {
+ //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
$userRoot = OC_User::getHome($user);
$userDirectory = $userRoot . '/files';
if( !is_dir( $userDirectory )) {