summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-08-26 22:03:02 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-08-26 22:04:31 +0200
commit045c94ec3e3fe0bd3cbb05a46b3c797e13050ac3 (patch)
tree95c0e841d2e4e0d5f8a2918cec4da4779eecbf46 /lib
parent55860549616e5527fdd8d0f30e40fa04ceef232a (diff)
downloadnextcloud-server-045c94ec3e3fe0bd3cbb05a46b3c797e13050ac3.tar.gz
nextcloud-server-045c94ec3e3fe0bd3cbb05a46b3c797e13050ac3.zip
enable user backends to define their own place where to store the data
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php
index e63eb5b24c9..a1bf214690e 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -33,19 +33,21 @@ class OC_Util {
if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem
$user_dir = '/'.$user.'/files';
- $userdirectory = $CONFIG_DATADIRECTORY.$user_dir;
+ $user_root = OC_User::getHome($user);
+ $userdirectory = $user_root . '/files';
if( !is_dir( $userdirectory )){
mkdir( $userdirectory, 0755, true );
}
//jail the user into his "home" directory
+ OC_Filesystem::mount('OC_Filestorage_Local',array('datadir'=>$user_root), $user);
OC_Filesystem::init($user_dir);
$quotaProxy=new OC_FileProxy_Quota();
OC_FileProxy::register($quotaProxy);
self::$fsSetup=true;
// Load personal mount config
- if (is_file($CONFIG_DATADIRECTORY.'/'.$user.'/mount.php')) {
- $mountConfig = include($CONFIG_DATADIRECTORY.'/'.$user.'/mount.php');
+ if (is_file($user_root.'/mount.php')) {
+ $mountConfig = include($user_root.'/mount.php');
if (isset($mountConfig['user'][$user])) {
foreach ($mountConfig['user'][$user] as $mountPoint => $options) {
OC_Filesystem::mount($options['class'], $options['options'], $mountPoint);