From 9d2d3c48091fd2a07a59049ef552be2fb7ab5671 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Fri, 22 May 2020 09:21:53 +0200 Subject: [PATCH] Clear the statscache before fetching the metadata Else if a lot of writes happen. It might happen that an old stat result is used. Resulting in a wrong file size for the file. For example the text app when a lot of people edit at the same time. Signed-off-by: Roeland Jago Douma --- lib/private/Files/Storage/Local.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 6da019178c..4cf3ac4799 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -156,6 +156,7 @@ class Local extends \OC\Files\Storage\Common { */ public function getMetaData($path) { $fullPath = $this->getSourcePath($path); + clearstatcache(); $stat = @stat($fullPath); if (!$stat) { return null;