Avoid re-propagation of shares during one propagation run
* fix was proposed by @nickvergessen
This commit is contained in:
parent
f6df37e0cc
commit
e1a79cd651
|
@ -126,7 +126,13 @@ class RecipientPropagator {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected $propagatingIds = [];
|
||||||
|
|
||||||
public function propagateById($id) {
|
public function propagateById($id) {
|
||||||
|
if (isset($this->propagatingIds[$id])) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$this->propagatingIds[$id] = true;
|
||||||
$shares = Share::getAllSharesForFileId($id);
|
$shares = Share::getAllSharesForFileId($id);
|
||||||
foreach ($shares as $share) {
|
foreach ($shares as $share) {
|
||||||
// propagate down the share tree
|
// propagate down the share tree
|
||||||
|
@ -141,5 +147,7 @@ class RecipientPropagator {
|
||||||
$watcher->writeHook(['path' => $path]);
|
$watcher->writeHook(['path' => $path]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unset($this->propagatingIds[$id]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue