diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-06 20:39:36 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-06 20:39:36 +0200 |
commit | b4a6cf35fe8c637cec5be811f109f6f841456283 (patch) | |
tree | 54309235bf559682dc6e18e48cb47a0965418538 | |
parent | 7f528c34ba7599aa495139be64da78037af155bc (diff) |
Added some code to ignore empty folders when deleting directories
-rw-r--r-- | system/helpers/file_helper.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php index 58951823b..6378784f4 100644 --- a/system/helpers/file_helper.php +++ b/system/helpers/file_helper.php @@ -132,7 +132,11 @@ if ( ! function_exists('delete_files')) {
if (is_dir($path.'/'.$filename))
{
- delete_files($path.'/'.$filename, $del_dir, $level + 1);
+ // Ignore empty folders
+ if (substr($filename, 0, 1) != '.')
+ {
+ delete_files($path.'/'.$filename, $del_dir, $level + 1);
+ }
}
else
{
|