Permalink
Browse files

directory_map() ... the final one

  • Loading branch information...
1 parent ac68a3c commit e8b8904bdfd6f8320beb67fb6daa96ee14c3b917 @narfbg narfbg committed Nov 6, 2012
Showing with 3 additions and 2 deletions.
  1. +2 −1 system/helpers/directory_helper.php
  2. +1 −1 tests/codeigniter/helpers/directory_helper_test.php
@@ -69,9 +69,10 @@ function directory_map($source_dir, $directory_depth = 0, $hidden = FALSE)
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
@@ -30,7 +30,7 @@ public function test_directory_map()
$expected = array(
'libraries/' => array(
'benchmark.html',
- 'database' => array('active_record.html', 'binds.html'),
+ 'database/' => array('active_record.html', 'binds.html'),
'email.html',
'0'
)

0 comments on commit e8b8904

Please sign in to comment.