Fixing clearCache() so it doesn't delete files named 'empty'. Applies Ceeram's changes without modifying the entire file. Fixes #469

This commit is contained in:
Mark Story 2010-03-20 18:54:35 -04:00
parent 6d13f0d3d1
commit 8a4ad9f51a

View file

@ -578,7 +578,7 @@ if (!function_exists('file_put_contents')) {
} }
foreach ($files as $file) { foreach ($files as $file) {
if (is_file($file)) { if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
@unlink($file); @unlink($file);
} }
} }
@ -599,7 +599,7 @@ if (!function_exists('file_put_contents')) {
return false; return false;
} }
foreach ($files as $file) { foreach ($files as $file) {
if (is_file($file)) { if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
@unlink($file); @unlink($file);
} }
} }