From 3e9519e07af366f9bd7b48de34db689f573d37ea Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Fri, 15 Jan 2010 00:09:34 +0000 Subject: Update to file helper to return FALSE on failure. --- system/helpers/file_helper.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'system/helpers') 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; } } -- cgit v1.2.3-24-g4f1b