[-] Core : Fixed bug #PSCFV-586 - index.php was deleted during the Smarty Cache deletion

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15201 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bLeveque
2012-05-11 01:21:09 +00:00
parent 041ff2c215
commit 67ffd0ce27
@@ -176,10 +176,12 @@ class Smarty_Internal_CacheResource_File extends Smarty_CacheResource {
$_cacheDirs = new RecursiveDirectoryIterator($_dir);
$_cache = new RecursiveIteratorIterator($_cacheDirs, RecursiveIteratorIterator::CHILD_FIRST);
foreach ($_cache as $_file) {
/* PrestaShop
if (substr($_file->getBasename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;*/
if (substr($_file->getFilename(),0,1) == '.' || strpos($_file, '.svn') !== false) continue;
/* END */
/* PrestaShop - Do not delete index.php and .svn files */
if (preg_match('/^(\.|\.\.|\.svn|index\.php)$/', $_file->getFilename()))
continue;
/* End */
// directory ?
if ($_file->isDir()) {
if (!$_cache->isDot()) {