Merge pull request #22733 from owncloud/size-propagation-new-file

fix size propagation for new files
This commit is contained in:
Thomas Müller 2016-03-01 08:20:34 +01:00
commit da18d04b38

View file

@ -198,7 +198,11 @@ class Scanner extends BasicEmitter implements IScanner {
if (!empty($newData)) {
$data['fileid'] = $this->addToCache($file, $newData, $fileId);
}
$data['oldSize'] = $cacheData['size'];
if (isset($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
if ($data['mimetype'] !== 'httpd/unix-directory') {