summaryrefslogtreecommitdiffstats
path: root/lib/private/files/filesystem.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/filesystem.php')
-rw-r--r--lib/private/files/filesystem.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php
index 10ec5c41d11..e40502bbe64 100644
--- a/lib/private/files/filesystem.php
+++ b/lib/private/files/filesystem.php
@@ -305,7 +305,13 @@ class Filesystem {
$parser = new \OC\ArrayParser();
$root = \OC_User::getHome($user);
- self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
+
+ $userObject = \OC_User::getManager()->get($user);
+ if (\OC\Files\Cache\Storage::exists('local::' . $root . '/') or is_null($userObject)) {
+ self::mount('\OC\Files\Storage\Local', array('datadir' => $root), $user);
+ } else {
+ self::mount('\OC\Files\Storage\Home', array('user' => $userObject), $user);
+ }
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
//move config file to it's new position