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
This commit is contained in:
Olivier Paroz 2015-09-30 01:50:15 +02:00
parent c269f658eb
commit 9ea05c898e

View file

@ -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);
}