Skip to content
Snippets Groups Projects
Commit 8c700cc9 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix size propagation for new files

parent 52d217d7
Branches
No related tags found
No related merge requests found
...@@ -198,7 +198,11 @@ class Scanner extends BasicEmitter implements IScanner { ...@@ -198,7 +198,11 @@ class Scanner extends BasicEmitter implements IScanner {
if (!empty($newData)) { if (!empty($newData)) {
$data['fileid'] = $this->addToCache($file, $newData, $fileId); $data['fileid'] = $this->addToCache($file, $newData, $fileId);
} }
if (isset($cacheData['size'])) {
$data['oldSize'] = $cacheData['size']; $data['oldSize'] = $cacheData['size'];
} else {
$data['oldSize'] = 0;
}
// post-emit only if it was a file. By that we avoid counting/treating folders as files // post-emit only if it was a file. By that we avoid counting/treating folders as files
if ($data['mimetype'] !== 'httpd/unix-directory') { if ($data['mimetype'] !== 'httpd/unix-directory') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment