fix url generation - now a test to nested repositories (testInitialPage test) is passing on windows os.

This commit is contained in:
Marcos Coelho
2013-01-03 00:18:06 -02:00
parent 5cf1e15605
commit 9d341b59ab

View File

@@ -42,7 +42,7 @@ class Routing
{
if (strpos($repoPath, $this->app['git.repos']) === 0) {
$relativePath = substr($repoPath, strlen($this->app['git.repos']));
return ltrim($relativePath, '/');
return ltrim(strtr($relativePath, '\\', '/'), '/');
} else {
throw new \InvalidArgumentException(
sprintf("Path '%s' does not match configured repository directory", $repoPath)