diff options
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(); } } |