Skip to content
Snippets Groups Projects
Commit 21df2eb5 authored by Vincent Petry's avatar Vincent Petry
Browse files

Merge pull request #24695 from owncloud/background-scan-propagate

Trigger propagation from the background scanner
parents 68c5df79 e6386652
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment