summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/file_helper.php5
-rw-r--r--user_guide/changelog.html1
2 files changed, 3 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
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 1ab6ac221..03c77d35c 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -163,6 +163,7 @@ Change Log
<li>Removed an extraneous call to loading models (#3286).</li>
<li>Removed extraneous load of $CFG in _display_cache() of the Output class (#3285).</li>
<li>Removed an unused parameter from Profiler (#3332).</li>
+ <li>Fixed a bug (#3314) which would cause the top level path to be deleted in delete_files() of the File helper.</li>
<li>Fixed a bug (#2858) which referenced a wrong variable in the Image class.</li>
<li>Fixed a bug (#3330) in the FTP class where a comparison wasn't getting made.</li>
<li>Fixed a bug (#3328) where the smiley helper might return an undefined variable.</li>