diff options
-rw-r--r-- | system/helpers/directory_helper.php | 3 | ||||
-rw-r--r-- | tests/codeigniter/helpers/directory_helper_test.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php index e90c92d79..49dcfc8a9 100644 --- a/system/helpers/directory_helper.php +++ b/system/helpers/directory_helper.php @@ -69,9 +69,10 @@ if ( ! function_exists('directory_map')) continue; } + @is_dir($source_dir.$file) AND $file .= DIRECTORY_SEPARATOR; + if (($directory_depth < 1 OR $new_depth > 0) && @is_dir($source_dir.$file)) { - $file .= DIRECTORY_SEPARATOR; $filedata[$file] = directory_map($source_dir.$file, $new_depth, $hidden); } else diff --git a/tests/codeigniter/helpers/directory_helper_test.php b/tests/codeigniter/helpers/directory_helper_test.php index b7d52661f..41370e6e7 100644 --- a/tests/codeigniter/helpers/directory_helper_test.php +++ b/tests/codeigniter/helpers/directory_helper_test.php @@ -30,7 +30,7 @@ class Directory_helper_test extends CI_TestCase { $expected = array( 'libraries/' => array( 'benchmark.html', - 'database' => array('active_record.html', 'binds.html'), + 'database/' => array('active_record.html', 'binds.html'), 'email.html', '0' ) |