summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-05-23 14:32:28 +0200
committerVincent Petry <pvince81@owncloud.com>2016-05-23 14:32:28 +0200
commit21df2eb5a1c8b305d953dcc34386da53ec953aee (patch)
tree654a53e37d01aee7a8c972eb9484c22804b3c480
parent68c5df798c237ef3f5ad101eb14612b95fe02e29 (diff)
parente6386652dfec0bac63b6a96ceaddf5d3318ca0b7 (diff)
downloadnextcloud-server-21df2eb5a1c8b305d953dcc34386da53ec953aee.tar.gz
nextcloud-server-21df2eb5a1c8b305d953dcc34386da53ec953aee.zip
Merge pull request #24695 from owncloud/background-scan-propagate
Trigger propagation from the background scanner
-rw-r--r--lib/private/Files/Utils/Scanner.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/private/Files/Utils/Scanner.php b/lib/private/Files/Utils/Scanner.php
index b013cbecabc..470b12bb44a 100644
--- a/lib/private/Files/Utils/Scanner.php
+++ b/lib/private/Files/Utils/Scanner.php
@@ -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();
}
}