From 0dbcbc4cae2eb669fc73f60a761855a907469111 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Tue, 19 Apr 2016 17:01:34 +0200 Subject: 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 --- lib/private/files/cache/scanner.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/private/files') 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'])) { -- cgit v1.2.3