summaryrefslogtreecommitdiff
path: root/it_url.class
diff options
context:
space:
mode:
authorUrban Müller2010-07-14 16:02:11 +0000
committerUrban Müller2010-07-14 16:02:11 +0000
commitba85ece21f086e87597e6697ba320b3c15b6a45a (patch)
tree838b4182928fb8b2dd1a80493989060a78891772 /it_url.class
parent0029fed7c8dc5dba55c8c6374ca451e81f7071d5 (diff)
downloaditools-ba85ece21f086e87597e6697ba320b3c15b6a45a.tar.gz
itools-ba85ece21f086e87597e6697ba320b3c15b6a45a.tar.bz2
itools-ba85ece21f086e87597e6697ba320b3c15b6a45a.zip
fix keepfailed mode
Diffstat (limited to 'it_url.class')
-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);