diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-01 08:20:34 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-03-01 08:20:34 +0100 |
commit | da18d04b384c591534436a99c38870792f782d31 (patch) | |
tree | ec5f0d0169aeaad3ad3aa22e85cc5122cc43c8fc /lib/private/files | |
parent | caf6c43187aa9c36303aad8ab72cbf1f154b3068 (diff) | |
parent | 8c700cc99d316127a71c9ba596694840775e3d6e (diff) | |
download | nextcloud-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.php | 6 |
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') { |