summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--it_url.class4
1 files changed, 3 insertions, 1 deletions
diff --git a/it_url.class b/it_url.class
index 9fa2e91..4c05877 100644
--- a/it_url.class
+++ b/it_url.class
@@ -413,7 +413,9 @@ function get_cache($p = array())
EDC('getcache', "new", $filemtime, $p['url'], $path);
if ($result = it_url::get($p + array('filemtime' => EDC('nocache') ? null : $filemtime))) # => true means not modified (no new data fetched)
$newfile = it_url::_atomicwrite($path, $result);
- else if (!$p['keepfailed'])
+ else if ($p['keepfailed'])
+ $result = file_exists($path);
+ else
@unlink($path); # Expired and failed to get
it_url::_unlock($path, $lock);