diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-05-18 14:31:43 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-05-18 14:31:43 +0200 |
commit | e6386652dfec0bac63b6a96ceaddf5d3318ca0b7 (patch) | |
tree | 90988e461c5ac89df52c3f8a9a7f0c793522b7ee /lib/private/Files | |
parent | e383a9506df196e9421d3494b9f84ae28deea55d (diff) | |
download | nextcloud-server-e6386652dfec0bac63b6a96ceaddf5d3318ca0b7.tar.gz nextcloud-server-e6386652dfec0bac63b6a96ceaddf5d3318ca0b7.zip |
Trigger propagation from the background scanner
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/Utils/Scanner.php | 14 |
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(); } } |