aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-03-01 08:20:34 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-03-01 08:20:34 +0100
commitda18d04b384c591534436a99c38870792f782d31 (patch)
treeec5f0d0169aeaad3ad3aa22e85cc5122cc43c8fc /lib/private/files
parentcaf6c43187aa9c36303aad8ab72cbf1f154b3068 (diff)
parent8c700cc99d316127a71c9ba596694840775e3d6e (diff)
downloadnextcloud-server-da18d04b384c591534436a99c38870792f782d31.tar.gz
nextcloud-server-da18d04b384c591534436a99c38870792f782d31.zip
Merge pull request #22733 from owncloud/size-propagation-new-file
fix size propagation for new files
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/cache/scanner.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php
index 60daa323b4b..822b68f5e75 100644
--- a/lib/private/files/cache/scanner.php
+++ b/lib/private/files/cache/scanner.php
@@ -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') {