summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-08-29 14:36:00 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-10-20 11:28:36 +0200
commit9b0f0df7f52d16e71d40834035dd840ad4fa86b0 (patch)
treee850cf5a0898a5e055fc285c83b10a42d5e29d0c /lib/private/server.php
parent87da62072b6df177bceb0c78c350458e0df86d0a (diff)
downloadnextcloud-server-9b0f0df7f52d16e71d40834035dd840ad4fa86b0.tar.gz
nextcloud-server-9b0f0df7f52d16e71d40834035dd840ad4fa86b0.zip
make skeleton compatible with objectstore
suspend encryption proxy when copying skeleton
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php15
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);
}