MDL-30349 clear file stat cache when adding new theme cache files

Hopefully this will resolve some cache reset problems.
This commit is contained in:
Petr Skoda
2011-11-19 12:14:26 +01:00
parent 0b9f2a02ab
commit e164a0dfea
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -115,6 +115,9 @@ if ($rev > -1) {
$pathinfo = pathinfo($imagefile);
$cacheimage = "$candidatelocation/$image.".$pathinfo['extension'];
if (!file_exists($cacheimage)) {
// note: cache reset might have purged our cache dir structure,
// make sure we do not use stale file stat cache in the next check_dir_exists()
clearstatcache();
check_dir_exists(dirname($cacheimage));
copy($imagefile, $cacheimage);
}