|
@@ 156-159 (lines=4) @@
|
| 153 |
|
if ($data) { |
| 154 |
|
|
| 155 |
|
// pre-emit only if it was a file. By that we avoid counting/treating folders as files |
| 156 |
|
if ($data['mimetype'] !== 'httpd/unix-directory') { |
| 157 |
|
$this->emit('\OC\Files\Cache\Scanner', 'scanFile', [$file, $this->storageId]); |
| 158 |
|
\OC_Hook::emit('\OC\Files\Cache\Scanner', 'scan_file', ['path' => $file, 'storage' => $this->storageId]); |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
$parent = \dirname($file); |
| 162 |
|
if ($parent === '.' or $parent === '/') { |
|
@@ 230-233 (lines=4) @@
|
| 227 |
|
} |
| 228 |
|
|
| 229 |
|
// post-emit only if it was a file. By that we avoid counting/treating folders as files |
| 230 |
|
if ($data['mimetype'] !== 'httpd/unix-directory') { |
| 231 |
|
$this->emit('\OC\Files\Cache\Scanner', 'postScanFile', [$file, $this->storageId]); |
| 232 |
|
\OC_Hook::emit('\OC\Files\Cache\Scanner', 'post_scan_file', ['path' => $file, 'storage' => $this->storageId]); |
| 233 |
|
} |
| 234 |
|
} else { |
| 235 |
|
$this->removeFromCache($file); |
| 236 |
|
} |