mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
caching of userfolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
70c37c2717
commit
f7c942a943
1 changed files with 2 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue