summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-30 01:50:15 +0200
committerOlivier Paroz <github@oparoz.com>2015-09-30 18:19:11 +0200
commit788831f13994f76592a47290d757cb6ad0e7a70e (patch)
tree7d8f1d208eeaabec62a286e46b80e752583f3e9b /lib
parent9a81eca7ba20c01135e6d1fb03ad9e7e88c1167a (diff)
downloadnextcloud-server-788831f13994f76592a47290d757cb6ad0e7a70e.tar.gz
nextcloud-server-788831f13994f76592a47290d757cb6ad0e7a70e.zip
Always send a postScanFile event when done scanning a file
postScanFile is important when scanning external storage as it indicates when the file is ready to be used (cherry picked from commit 9ea05c8)
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/cache/scanner.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 50609e1e20e..2296917fcb8 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);
}