From dafa6ebffa371b2c5f9db0729ceffa2f4a252cb9 Mon Sep 17 00:00:00 2001 From: tmont Date: Tue, 30 Jun 2009 05:43:46 +0000 Subject: [PATCH] fixed subdirectory calculation --- src/TUnit/framework/reporting/CoverageReporter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/TUnit/framework/reporting/CoverageReporter.php b/src/TUnit/framework/reporting/CoverageReporter.php index 585ed80..feb5eb1 100644 --- a/src/TUnit/framework/reporting/CoverageReporter.php +++ b/src/TUnit/framework/reporting/CoverageReporter.php @@ -302,8 +302,9 @@ $info = ''; $link = ''; $subdirs = array(); + $cleanDir = rtrim($dir, DIRECTORY_SEPARATOR); foreach ($dirData as $dir2 => $data2) { - if ($dir === DIRECTORY_SEPARATOR || substr($dir2, 0, strrpos($dir2, DIRECTORY_SEPARATOR)) === $dir) { + if (substr($dir2, 0, strrpos($dir2, DIRECTORY_SEPARATOR)) === $cleanDir) { //this is a direct subdirectory $subdirs[] = $dir2; }