Merge pull request #18834 from owncloud/delay-listen-owner-changes
Delay listening to owner changes untill we use a share for that owner
This commit is contained in:
commit
30377e958f
2 changed files with 22 additions and 2 deletions
|
@ -69,12 +69,11 @@ class MountProvider implements IMountProvider {
|
|||
// for updating etags for the share owner when we make changes to this share.
|
||||
$ownerPropagator = $this->propagationManager->getChangePropagator($share['uid_owner']);
|
||||
|
||||
// for updating our etags when changes are made to the share from the owners side (probably indirectly by us trough another share)
|
||||
$this->propagationManager->listenToOwnerChanges($share['uid_owner'], $user->getUID());
|
||||
return new SharedMount(
|
||||
'\OC\Files\Storage\Shared',
|
||||
'/' . $user->getUID() . '/' . $share['file_target'],
|
||||
array(
|
||||
'propagationManager' => $this->propagationManager,
|
||||
'propagator' => $ownerPropagator,
|
||||
'share' => $share,
|
||||
'user' => $user->getUID()
|
||||
|
|
|
@ -50,13 +50,34 @@ class Shared extends \OC\Files\Storage\Common implements ISharedStorage {
|
|||
*/
|
||||
private $ownerView;
|
||||
|
||||
/**
|
||||
* @var \OCA\Files_Sharing\Propagation\PropagationManager
|
||||
*/
|
||||
private $propagationManager;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
private $user;
|
||||
|
||||
private $initialized = false;
|
||||
|
||||
public function __construct($arguments) {
|
||||
$this->share = $arguments['share'];
|
||||
$this->ownerView = $arguments['ownerView'];
|
||||
$this->propagationManager = $arguments['propagationManager'];
|
||||
$this->user = $arguments['user'];
|
||||
}
|
||||
|
||||
private function init() {
|
||||
if ($this->initialized) {
|
||||
return;
|
||||
}
|
||||
$this->initialized = true;
|
||||
Filesystem::initMountPoints($this->share['uid_owner']);
|
||||
|
||||
// for updating our etags when changes are made to the share from the owners side (probably indirectly by us trough another share)
|
||||
$this->propagationManager->listenToOwnerChanges($this->share['uid_owner'], $this->user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue