From 9d341b59ab867feb4ecb8d55bb3cf9c40c6b5ead Mon Sep 17 00:00:00 2001 From: Marcos Coelho Date: Thu, 3 Jan 2013 00:18:06 -0200 Subject: [PATCH] fix url generation - now a test to nested repositories (testInitialPage test) is passing on windows os. --- src/GitList/Util/Routing.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GitList/Util/Routing.php b/src/GitList/Util/Routing.php index 884e251..d0a60ff 100644 --- a/src/GitList/Util/Routing.php +++ b/src/GitList/Util/Routing.php @@ -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)