]> source.dussan.org Git - nextcloud-server.git/commitdiff
Clear the statscache before fetching the metadata 21065/head
authorRoeland Jago Douma <roeland@famdouma.nl>
Fri, 22 May 2020 07:21:53 +0000 (09:21 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Fri, 22 May 2020 07:21:53 +0000 (09:21 +0200)
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>
lib/private/Files/Storage/Local.php

index 6da019178c07fd7537e9498640ef686687e68a87..4cf3ac4799fa50a43508b68b0dfe194754d1a986 100644 (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;