mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Trigger propagation from the background scanner
This commit is contained in:
parent
e383a9506d
commit
e6386652df
1 changed files with 13 additions and 1 deletions
|
|
@ -123,8 +123,20 @@ class Scanner extends PublicEmitter {
|
|||
if ($mount->getStorage()->instanceOfStorage('\OC\Files\Storage\Local') && $mount->getMountPoint() === '/') {
|
||||
continue;
|
||||
}
|
||||
$scanner = $mount->getStorage()->getScanner();
|
||||
$storage = $mount->getStorage();
|
||||
$scanner = $storage->getScanner();
|
||||
$this->attachListener($mount);
|
||||
|
||||
$scanner->listen('\OC\Files\Cache\Scanner', 'removeFromCache', function ($path) use ($storage) {
|
||||
$this->triggerPropagator($storage, $path);
|
||||
});
|
||||
$scanner->listen('\OC\Files\Cache\Scanner', 'updateCache', function ($path) use ($storage) {
|
||||
$this->triggerPropagator($storage, $path);
|
||||
});
|
||||
$scanner->listen('\OC\Files\Cache\Scanner', 'addToCache', function ($path) use ($storage) {
|
||||
$this->triggerPropagator($storage, $path);
|
||||
});
|
||||
|
||||
$scanner->backgroundScan();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue