diff options
author | Jeroen van der Gulik <jeroen@isset.nl> | 2011-09-16 13:39:30 +0200 |
---|---|---|
committer | Jeroen van der Gulik <jeroen@isset.nl> | 2011-09-16 13:39:30 +0200 |
commit | a3a8b61e76c8e7a70f7b176146b325061e5956c4 (patch) | |
tree | 24ae3d377fbb128bc1bda32a38a298df9e93256c /system/libraries | |
parent | 1fa4f87f359a3483fa54dad42d3c9d7e5fa45ccb (diff) |
- check if file exists before unlinking
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Cache/drivers/Cache_file.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/system/libraries/Cache/drivers/Cache_file.php b/system/libraries/Cache/drivers/Cache_file.php index 6c37e7005..2a89faf09 100644 --- a/system/libraries/Cache/drivers/Cache_file.php +++ b/system/libraries/Cache/drivers/Cache_file.php @@ -107,7 +107,14 @@ class CI_Cache_file extends CI_Driver { */ public function delete($id) { - return unlink($this->_cache_path.$id); + if (file_exists($this->_cache_path.$id)) + { + return unlink($this->_cache_path.$id); + } + else + { + return FALSE; + } } // ------------------------------------------------------------------------ @@ -192,4 +199,4 @@ class CI_Cache_file extends CI_Driver { // End Class /* End of file Cache_file.php */ -/* Location: ./system/libraries/Cache/drivers/Cache_file.php */
\ No newline at end of file +/* Location: ./system/libraries/Cache/drivers/Cache_file.php */ |