Skip to content

Commit

Permalink
added normalizePath to convert Windows backslashes to normal slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Nov 19, 2017
1 parent fdc740a commit 4c7e79d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,14 @@ protected static function putFile($path, $content)
*/
public function substituteOutputDirs($data)
{
return static::substitutePaths($data, dirname(dirname(dirname($this->outputDir))), static::BASE_DIR_MARKER);
$dir = static::normalizePath(dirname(dirname(dirname($this->outputDir))));

return static::substitutePaths($data, $dir, static::BASE_DIR_MARKER);
}

public static function normalizePath($path, $ds = DIRECTORY_SEPARATOR)
{
return rtrim(strtr($path, '/\\', $ds . $ds), $ds);
}

/**
Expand Down

0 comments on commit 4c7e79d

Please sign in to comment.