Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 954c61f

Browse files
author
Michael Grauer
committed
BUG: refs #0349. Clearing stat cache, as filesizes might have changed.
1 parent 8218ab2 commit 954c61f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/models/dao/BitstreamDao.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ function fillPropertiesFromPath()
3232

3333
// TODO Compute the full path from the assetstore. For now using the path
3434
$this->setMimetype($this->Component->MimeType->getType($this->path));
35+
// clear the stat cache, as the underlying file might have changed
36+
// since the last time filesize was called on the same filepath
37+
clearstatcache(true, $this->path);
3538
$this->setSizebytes(filesize($this->path));
3639
if(!isset($this->checksum) || empty($this->checksum))
3740
{

0 commit comments

Comments
 (0)