summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-08-29 21:35:55 +0200
committerBart Visscher <bartv@thisnet.nl>2012-08-29 21:35:55 +0200
commitc958d5ba808ce64083470f65f11d3f9e8b74f7a1 (patch)
treed3dae3abb0962b55cf0eb306fa2b28424e89e9e6 /lib
parent301baf0215cfa3046389b3369f3d43422ff80043 (diff)
downloadnextcloud-server-c958d5ba808ce64083470f65f11d3f9e8b74f7a1.tar.gz
nextcloud-server-c958d5ba808ce64083470f65f11d3f9e8b74f7a1.zip
Fix filesystem setup for shared public link with logged in user
Diffstat (limited to 'lib')
-rwxr-xr-xlib/util.php18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/util.php b/lib/util.php
index b77d6cb1b65..10b88b24438 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -19,6 +19,18 @@ class OC_Util {
return false;
}
+ // If we are not forced to load a specific user we load the one that is logged in
+ if( $user == "" && OC_User::isLoggedIn()){
+ $user = OC_User::getUser();
+ }
+
+ // the filesystem will finish when $user is not empty,
+ // mark fs setup here to avoid doing the setup from loading
+ // OC_Filesystem
+ if ($user != '') {
+ self::$fsSetup=true;
+ }
+
$CONFIG_DATADIRECTORY = OC_Config::getValue( "datadirectory", OC::$SERVERROOT."/data" );
//first set up the local "root" storage
if(!self::$rootMounted){
@@ -26,11 +38,6 @@ class OC_Util {
self::$rootMounted=true;
}
- // If we are not forced to load a specific user we load the one that is logged in
- if( $user == "" && OC_User::isLoggedIn()){
- $user = OC_User::getUser();
- }
-
if( $user != "" ){ //if we aren't logged in, there is no use to set up the filesystem
$user_dir = '/'.$user.'/files';
$user_root = OC_User::getHome($user);
@@ -43,7 +50,6 @@ class OC_Util {
OC_Filesystem::init($user_dir);
$quotaProxy=new OC_FileProxy_Quota();
OC_FileProxy::register($quotaProxy);
- self::$fsSetup=true;
// Load personal mount config
if (is_file($user_root.'/mount.php')) {
$mountConfig = include($user_root.'/mount.php');