diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-02-29 17:31:01 +0100 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2016-02-29 17:31:01 +0100 |
commit | 8c700cc99d316127a71c9ba596694840775e3d6e (patch) | |
tree | a6d306c99ae3264901a28ce3a4a10fc6ed683193 /lib | |
parent | 52d217d77519ed95a18237b09a351f83a0ae7f47 (diff) | |
download | nextcloud-server-8c700cc99d316127a71c9ba596694840775e3d6e.tar.gz nextcloud-server-8c700cc99d316127a71c9ba596694840775e3d6e.zip |
fix size propagation for new files
Diffstat (limited to 'lib')
-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') { |