Skip to content

Commit

Permalink
fix: move to IUserSession
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <[email protected]>
  • Loading branch information
solracsf authored Nov 25, 2024
1 parent 5f8e3f3 commit 65ab207
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/private/Cache/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use OC\Files\Filesystem;
use OC\Files\View;
use OC\User\Session;
use OCP\ICache;
use OCP\IUserSession;
use OCP\Security\ISecureRandom;
Expand All @@ -31,9 +30,10 @@ protected function getStorage() {
if ($this->storage !== null) {
return $this->storage;
}
if (Server::get(IUserSession::class)->isLoggedIn()) {
$session = Server::get(IUserSession::class);
if ($session->isLoggedIn()) {
$rootView = new View();
$userId = Server::get(Session::class)->getUser()->getUID();
$userId = $session->getUser()->getUID();
Filesystem::initMountPoints($userId);
if (!$rootView->file_exists('/' . $userId . '/cache')) {
$rootView->mkdir('/' . $userId . '/cache');
Expand Down

0 comments on commit 65ab207

Please sign in to comment.