Skip to content

Commit 6609b10

Browse files
committed
Merge pull request #68 from rogeriopradoj/master
Fix --report-gitblame issue in windows machines
2 parents 33c6012 + f1d063f commit 6609b10

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CodeSniffer/Reports/Gitblame.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ protected function getBlameContent($filename)
8787
echo 'Getting GIT blame info for '.basename($filename).'... ';
8888
}
8989

90-
$fileParts = explode('/', $filename);
90+
$fileParts = explode(DIRECTORY_SEPARATOR, $filename);
9191
$found = false;
9292
$location = '';
9393
while (empty($fileParts) === false) {
9494
array_pop($fileParts);
95-
$location = implode($fileParts, '/');
96-
if (is_dir($location.'/.git') === true) {
95+
$location = implode($fileParts, DIRECTORY_SEPARATOR);
96+
if (is_dir($location . DIRECTORY_SEPARATOR.'.git') === true) {
9797
$found = true;
9898
break;
9999
}

0 commit comments

Comments
 (0)