summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/cache/scanner.php4
-rw-r--r--lib/private/files/utils/scanner.php7
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index fb60ee5aa53..bfdab16b645 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -186,9 +186,9 @@ class Scanner extends BasicEmitter {
}
if (!empty($newData)) {
$data['fileid'] = $this->addToCache($file, $newData, $fileId);
- $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId));
- \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
}
+ $this->emit('\OC\Files\Cache\Scanner', 'postScanFile', array($file, $this->storageId));
+ \OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', array('path' => $file, 'storage' => $this->storageId));
} else {
$this->removeFromCache($file);
}
diff --git a/lib/private/files/utils/scanner.php b/lib/private/files/utils/scanner.php
index c70f4beb31d..558a1fba028 100644
--- a/lib/private/files/utils/scanner.php
+++ b/lib/private/files/utils/scanner.php
@@ -99,7 +99,12 @@ class Scanner extends PublicEmitter {
$scanner->listen('\OC\Files\Cache\Scanner', 'scanFolder', function ($path) use ($mount, $emitter) {
$emitter->emit('\OC\Files\Utils\Scanner', 'scanFolder', array($mount->getMountPoint() . $path));
});
-
+ $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFile', function ($path) use ($mount, $emitter) {
+ $emitter->emit('\OC\Files\Utils\Scanner', 'postScanFile', array($mount->getMountPoint() . $path));
+ });
+ $scanner->listen('\OC\Files\Cache\Scanner', 'postScanFolder', function ($path) use ($mount, $emitter) {
+ $emitter->emit('\OC\Files\Utils\Scanner', 'postScanFolder', array($mount->getMountPoint() . $path));
+ });
// propagate etag and mtimes when files are changed or removed
$propagator = $this->propagator;
$propagatorListener = function ($path) use ($mount, $propagator) {