Permalink
Browse files

Fixing clearCache() so it doesn't delete files named 'empty'. Applies…

… Ceeram's changes without modifying the entire file. Fixes #469
  • Loading branch information...
1 parent 6d13f0d commit 8a4ad9f51a93f188547571c93e5dcae0d444a329 @markstory markstory committed Mar 20, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/basics.php
View
@@ -578,7 +578,7 @@ function clearCache($params = null, $type = 'views', $ext = '.php') {
}
foreach ($files as $file) {
- if (is_file($file)) {
+ if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
@unlink($file);
}
}
@@ -599,7 +599,7 @@ function clearCache($params = null, $type = 'views', $ext = '.php') {
return false;
}
foreach ($files as $file) {
- if (is_file($file)) {
+ if (is_file($file) && strrpos($file, DS . 'empty') !== strlen($file) - 6) {
@unlink($file);
}
}

0 comments on commit 8a4ad9f

Please sign in to comment.