diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-19 17:01:34 +0200 |
---|---|---|
committer | Roeland Jago Douma <rullzer@owncloud.com> | 2016-04-19 20:20:45 +0200 |
commit | 0dbcbc4cae2eb669fc73f60a761855a907469111 (patch) | |
tree | cbfc22a5a42c080842da615add0df9c6b4456bec /lib/private/files | |
parent | 7186975e35d03312f46b27d808a98f7bc6064078 (diff) | |
download | nextcloud-server-0dbcbc4cae2eb669fc73f60a761855a907469111.tar.gz nextcloud-server-0dbcbc4cae2eb669fc73f60a761855a907469111.zip |
When the scanner detects a file is changed clear checksum
Fixes #23782 and #23783
If the file scanner detects a changed file we clear the checksum while
we update the cache.
* Unit test added
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/cache/scanner.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/files/cache/scanner.php b/lib/private/files/cache/scanner.php index 5ca32548fe0..c16e8515b01 100644 --- a/lib/private/files/cache/scanner.php +++ b/lib/private/files/cache/scanner.php @@ -195,6 +195,8 @@ class Scanner extends BasicEmitter implements IScanner { $fileId = -1; } if (!empty($newData)) { + // Reset the checksum if the data has changed + $newData['checksum'] = ''; $data['fileid'] = $this->addToCache($file, $newData, $fileId); } if (isset($cacheData['size'])) { |