diff options
author | Greg Aker <greg.aker@ellislab.com> | 2010-01-15 01:09:34 +0100 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2010-01-15 01:09:34 +0100 |
commit | 3e9519e07af366f9bd7b48de34db689f573d37ea (patch) | |
tree | 716e075ad085e8063b633248f67c558c37ace6c6 /system/helpers | |
parent | c710211f85e3eb2107c167f6a66161f2b82c1c1c (diff) |
Update to file helper to return FALSE on failure.
Diffstat (limited to 'system/helpers')
-rw-r--r-- | system/helpers/file_helper.php | 8 |
1 files changed, 6 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; } } |