summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/file_helper.php8
-rw-r--r--user_guide/changelog.html1
2 files changed, 7 insertions, 2 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 114b2927a..2be06ac4f 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -124,7 +124,9 @@ if ( ! function_exists('delete_files'))
$path = rtrim($path, DIRECTORY_SEPARATOR);
if ( ! $current_dir = @opendir($path))
- return;
+ {
+ return TRUE;
+ }
while(FALSE !== ($filename = @readdir($current_dir)))
{
@@ -148,8 +150,10 @@ if ( ! function_exists('delete_files'))
if ($del_dir == TRUE AND $level > 0)
{
- @rmdir($path);
+ return @rmdir($path);
}
+
+ return TRUE;
}
}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index f54c00769..0e49bbdce 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -84,6 +84,7 @@ SVN Revision: </p>
<li>Non-backwards compatible change made to <kbd>get_dir_file_info()</kbd> in the <a href="helpers/file_helper.html">File Helper</a>. No longer recurses
by default so as to encourage responsible use (this function can cause server performance issues when used without caution).</li>
<li>Modified the second parameter of <kbd>directory_map()</kbd> in the <a href="helpers/directory_helper.html">Directory Helper</a> to accept an integer to specify recursion depth.</li>
+ <li>Modified <kbd>delete_files()</kbd> in the <a href="helpers/file_helper.html">File Helper</a> to return FALSE on failure.</li>
</ul>
</li>
</ul>