diff options
| author | Urban Müller | 2010-07-14 16:02:11 +0000 | 
|---|---|---|
| committer | Urban Müller | 2010-07-14 16:02:11 +0000 | 
| commit | ba85ece21f086e87597e6697ba320b3c15b6a45a (patch) | |
| tree | 838b4182928fb8b2dd1a80493989060a78891772 | |
| parent | 0029fed7c8dc5dba55c8c6374ca451e81f7071d5 (diff) | |
| download | itools-ba85ece21f086e87597e6697ba320b3c15b6a45a.tar.gz itools-ba85ece21f086e87597e6697ba320b3c15b6a45a.tar.bz2 itools-ba85ece21f086e87597e6697ba320b3c15b6a45a.zip  | |
fix keepfailed mode
| -rw-r--r-- | it_url.class | 4 | 
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);  |