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:
parent
c269f658eb
commit
9ea05c898e
1 changed files with 2 additions and 2 deletions
4
lib/private/files/cache/scanner.php
vendored
4
lib/private/files/cache/scanner.php
vendored
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue