diff options
author | Robin Appelman <robin@icewind.nl> | 2022-03-24 17:41:34 +0300 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2022-03-24 19:03:58 +0300 |
commit | f7c942a9436022bd14373ee9706c5a72bce021e9 (patch) | |
tree | 9fa6c55527f4945a2b381da39ddf5ebc30fc28f3 /lib | |
parent | 70c37c2717883adbc08f04f68aaa7dad741ce1c1 (diff) |
caching of userfolder
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Node/Root.php | 6 |
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); |