summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-05-22 09:21:53 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-05-28 10:30:35 +0000
commit9d2d3c48091fd2a07a59049ef552be2fb7ab5671 (patch)
tree06d307eec92d11561c33d1ab5ee0a74c98990c8e /lib/private
parentbdb9f31cf1ffb4728765bc9ab67f86d83e0bfb96 (diff)
downloadnextcloud-server-9d2d3c48091fd2a07a59049ef552be2fb7ab5671.tar.gz
nextcloud-server-9d2d3c48091fd2a07a59049ef552be2fb7ab5671.zip
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>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Local.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 6da019178c0..4cf3ac4799f 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;