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>
pull/21065/head
Roeland Jago Douma 6 years ago
parent 0a45f44beb
commit 6b26744787
No known key found for this signature in database
GPG Key ID: F941078878347C0C
  1. 1
      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;

Loading…
Cancel
Save