Merge pull request #31711 from nextcloud/mount-cache-external-share

invalidate mount cache after accepting or renaming federated share
pull/31697/head
Vincent Petry 2022-03-29 10:35:25 +07:00 committed by GitHub
commit 262d22f184
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

@ -374,6 +374,7 @@ class Manager {
$this->sendFeedbackToRemote($share['remote'], $share['share_token'], $share['remote_id'], 'accept');
$event = new FederatedShareAddedEvent($share['remote']);
$this->eventDispatcher->dispatchTyped($event);
$this->eventDispatcher->dispatchTyped(new Files\Events\InvalidateMountCacheEvent($this->userManager->get($this->uid)));
$result = true;
}
}
@ -596,6 +597,8 @@ class Manager {
');
$result = (bool)$query->execute([$target, $targetHash, $sourceHash, $this->uid]);
$this->eventDispatcher->dispatchTyped(new Files\Events\InvalidateMountCacheEvent($this->userManager->get($this->uid)));
return $result;
}