summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-05-18 14:31:43 +0200
committerRobin Appelman <icewind@owncloud.com>2016-05-18 14:31:43 +0200
commite6386652dfec0bac63b6a96ceaddf5d3318ca0b7 (patch)
tree90988e461c5ac89df52c3f8a9a7f0c793522b7ee /lib
parente383a9506df196e9421d3494b9f84ae28deea55d (diff)
downloadnextcloud-server-e6386652dfec0bac63b6a96ceaddf5d3318ca0b7.tar.gz
nextcloud-server-e6386652dfec0bac63b6a96ceaddf5d3318ca0b7.zip
Trigger propagation from the background scanner
Diffstat (limited to 'lib')
-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();
}
}