Skip to content

Commit

Permalink
Clear the statscache before fetching the metadata
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
rullzer committed May 22, 2020
1 parent 0a45f44 commit 6b26744
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/private/Files/Storage/Local.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public function stat($path) {
*/
public function getMetaData($path) {
$fullPath = $this->getSourcePath($path);
clearstatcache();
$stat = @stat($fullPath);
if (!$stat) {
return null;
Expand Down

0 comments on commit 6b26744

Please sign in to comment.