Skip to content

Commit 149885d

Browse files
committed
Normalize dir names
1 parent 13a813d commit 149885d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Context/GivenStepDefinitions.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ public function given_a_specific_directory( $empty_or_nonexistent, $dir ): void
5353
// Mac OS X can prefix the `/var` folder to turn it into `/private/var`.
5454
$dir = preg_replace( '|^/private/var/|', '/var/', $dir );
5555

56-
$temp_dir = sys_get_temp_dir();
56+
$temp_dir = Path::normalize( sys_get_temp_dir() );
57+
$dir = Path::normalize( $dir );
5758

5859
// Also check for temp dir prefixed with `/private` for Mac OS X.
5960
if ( 0 !== strpos( $dir, $temp_dir ) && 0 !== strpos( $dir, "/private{$temp_dir}" ) ) {

0 commit comments

Comments
 (0)