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 <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2020-05-22 09:21:53 +02:00 committed by backportbot[bot]
parent bdb9f31cf1
commit 9d2d3c4809
1 changed files with 1 additions and 0 deletions

View File

@ -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;