summaryrefslogtreecommitdiffstats
path: root/system/helpers/file_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/file_helper.php')
-rw-r--r--system/helpers/file_helper.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index bbf340930..ef07de76c 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -122,7 +122,7 @@ if (! function_exists('delete_files'))
{
// Trim the trailing slash
$path = preg_replace("|^(.+?)/*$|", "\\1", $path);
-
+
if ( ! $current_dir = @opendir($path))
return;
@@ -132,8 +132,7 @@ if (! function_exists('delete_files'))
{
if (is_dir($path.'/'.$filename))
{
- $level++;
- delete_files($path.'/'.$filename, $del_dir, $level);
+ delete_files($path.'/'.$filename, $del_dir, $level + 1);
}
else
{