summaryrefslogtreecommitdiffstats
path: root/system/helpers/file_helper.php
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-10-06 20:39:36 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-10-06 20:39:36 +0200
commitb4a6cf35fe8c637cec5be811f109f6f841456283 (patch)
tree54309235bf559682dc6e18e48cb47a0965418538 /system/helpers/file_helper.php
parent7f528c34ba7599aa495139be64da78037af155bc (diff)
Added some code to ignore empty folders when deleting directories
Diffstat (limited to 'system/helpers/file_helper.php')
-rw-r--r--system/helpers/file_helper.php6
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
{