summaryrefslogtreecommitdiff
path: root/inc/parserutils.php
diff options
context:
space:
mode:
authorChris Smith <chris@jalakai.co.uk>2008-02-23 03:55:39 +0100
committerChris Smith <chris@jalakai.co.uk>2008-02-23 03:55:39 +0100
commitcbaf42593d04d34785dbf732786f89d7f13fdb27 (patch)
tree4c9afe8f80c58124c36599b51b196a2f0f12c733 /inc/parserutils.php
parent85d03f688ed419d3e426dbb8187bf954d9a7a358 (diff)
downloadrpg-cbaf42593d04d34785dbf732786f89d7f13fdb27.tar.gz
rpg-cbaf42593d04d34785dbf732786f89d7f13fdb27.tar.bz2
Fix for FS#1334, see also FS#1090
FS#1090 ensured DW would never rebuild instructions in the same run by forcing subsequent instruction requests to use the version cached on the first request. That introduced problems when the caching of the instructions failed (FS#1334). This patch allows subsequent rebuilds when cache storage failed. darcs-hash:20080223025539-d26fc-26202a049a6969816553d950a2bb8f71a02ae76e.gz
Diffstat (limited to 'inc/parserutils.php')
-rw-r--r--inc/parserutils.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/inc/parserutils.php b/inc/parserutils.php
index 66d1ae13c..c65185239 100644
--- a/inc/parserutils.php
+++ b/inc/parserutils.php
@@ -183,8 +183,11 @@ function p_cached_instructions($file,$cacheonly=false,$id='') {
} else if (@file_exists($file)) {
// no cache - do some work
$ins = p_get_instructions(io_readfile($file));
- $cache->storeCache($ins);
- $run[$file] = true; // we won't rebuild these instructions in the same run again
+ if ($cache->storeCache($ins)) {
+ $run[$file] = true; // we won't rebuild these instructions in the same run again
+ } else {
+ msg('Unable to save cache file. Hint: disk full; file permissions; safe_mode setting.',-1);
+ }
return $ins;
}