From 8c700cc99d316127a71c9ba596694840775e3d6e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 29 Feb 2016 17:31:01 +0100 Subject: [PATCH] fix size propagation for new files --- lib/private/files/cache/scanner.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 60daa323b4..822b68f5e7 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') {