Merge pull request #22733 from owncloud/size-propagation-new-file
fix size propagation for new files
This commit is contained in:
commit
da18d04b38
1 changed files with 5 additions and 1 deletions
6
lib/private/files/cache/scanner.php
vendored
6
lib/private/files/cache/scanner.php
vendored
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue