Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-03-24 17:41:34 +0300
committerRobin Appelman <robin@icewind.nl>2022-03-24 19:03:58 +0300
commitf7c942a9436022bd14373ee9706c5a72bce021e9 (patch)
tree9fa6c55527f4945a2b381da39ddf5ebc30fc28f3
parent70c37c2717883adbc08f04f68aaa7dad741ce1c1 (diff)
caching of userfolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Files/Node/Root.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/private/Files/Node/Root.php b/lib/private/Files/Node/Root.php
index 349a83848a5..53162737b6f 100644
--- a/lib/private/Files/Node/Root.php
+++ b/lib/private/Files/Node/Root.php
@@ -383,16 +383,14 @@ class Root extends Folder implements IRootFolder {
if ($this->mountManager->getSetupManager()->isSetupComplete($userObject)) {
try {
$folder = $this->get('/' . $userId . '/files');
- if ($folder instanceof \OCP\Files\Folder) {
- return $folder;
- } else {
+ if (!$folder instanceof \OCP\Files\Folder) {
throw new \Exception("User folder for $userId exists as a file");
}
} catch (NotFoundException $e) {
if (!$this->nodeExists('/' . $userId)) {
$this->newFolder('/' . $userId);
}
- return $this->newFolder('/' . $userId . '/files');
+ $folder = $this->newFolder('/' . $userId . '/files');
}
} else {
$folder = new LazyUserFolder($this, $userObject);