From f0ecb55dfe8dbfaf4c65dbe9d7e1bba8c131ebf4 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Thu, 26 Jul 2012 17:00:33 +0200 Subject: If $htdocs = FALSE delete_files would never unlink --- system/helpers/file_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/file_helper.php') diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 3834d4895..b6c95d554 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -124,7 +124,7 @@ if ( ! function_exists('delete_files')) { delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $level + 1, $htdocs); } - elseif ($htdocs === TRUE && ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename)) + elseif ($htdocs === FALSE OR ($htdocs === TRUE && ! preg_match('/^(\.htaccess|index\.(html|htm|php)|web\.config)$/i', $filename))) { @unlink($path.DIRECTORY_SEPARATOR.$filename); } -- cgit v1.2.3-24-g4f1b