Skip to content

Commit 7b0ddca

Browse files
authored
Merge pull request #55 from szekely-szabolcs/patch-3
Compare file paths with same separators
2 parents 06e4cd5 + 1015bf5 commit 7b0ddca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/FileMatchers/EndsWith.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ protected function fileEndsWith(string $haystack, string $needle): bool
3535
return $this->fileEndsWith($needle, $haystack);
3636
}
3737

38+
$haystack = str_replace('\\', '/', $haystack);
39+
$needle = str_replace('\\', '/', $needle);
40+
3841
return (substr($haystack, -$length) === $needle);
3942
}
4043
}

0 commit comments

Comments
 (0)