Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2022-03-17 19:32:51 +01:00
parent 89919b0e24
commit 70c37c2717
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB
3 changed files with 2 additions and 6 deletions

View file

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace OC\Files\Node;
use OCP\Constants;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
@ -36,7 +35,7 @@ class LazyUserFolder extends LazyFolder {
public function __construct(IRootFolder $rootFolder, IUser $user) {
$this->rootFolder = $rootFolder;
$this->user = $user;
parent::__construct(function() use ($user) {
parent::__construct(function () use ($user) {
try {
return $this->rootFolder->get('/' . $user->getUID() . '/files');
} catch (NotFoundException $e) {
@ -54,6 +53,4 @@ class LazyUserFolder extends LazyFolder {
public function get($path) {
return $this->rootFolder->get('/' . $this->user->getUID() . '/files/' . rtrim($path, '/'));
}
}

View file

@ -38,7 +38,6 @@ use OC\Files\Mount\MountPoint;
use OC\Files\View;
use OC\Hooks\PublicEmitter;
use OC\User\NoUserException;
use OCP\Constants;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Events\Node\FilesystemTornDownEvent;

View file

@ -464,7 +464,7 @@ class SetupManager {
];
foreach ($genericEvents as $genericEvent) {
$this->eventDispatcher->addListener($genericEvent, function($event) {
$this->eventDispatcher->addListener($genericEvent, function ($event) {
$this->cache->clear();
});
}