From ba85ece21f086e87597e6697ba320b3c15b6a45a Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 14 Jul 2010 16:02:11 +0000 Subject: fix keepfailed mode --- it_url.class | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'it_url.class') 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); -- cgit v1.2.3