diff options
Diffstat (limited to 'lib/private/server.php')
-rw-r--r-- | lib/private/server.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index ff34cfdccb6..d2728d2b6ef 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -291,6 +291,8 @@ class Server extends SimpleContainer implements IServerContainer { return null; } $userId = $user->getUID(); + } else { + $user = $this->getUserManager()->get($userId); } $dir = '/' . $userId; $root = $this->getRootFolder(); @@ -305,6 +307,19 @@ class Server extends SimpleContainer implements IServerContainer { $dir = '/files'; if (!$folder->nodeExists($dir)) { $folder = $folder->newFolder($dir); + + if (\OCP\App::isEnabled('files_encryption')) { + // disable encryption proxy to prevent recursive calls + $proxyStatus = \OC_FileProxy::$enabled; + \OC_FileProxy::$enabled = false; + } + + \OC_Util::copySkeleton($user, $folder); + + if (\OCP\App::isEnabled('files_encryption')) { + // re-enable proxy - our work is done + \OC_FileProxy::$enabled = $proxyStatus; + } } else { $folder = $folder->get($dir); } |