Permalink
Browse files

Fix TopLevelRouter dirname call on windows, breaking routes.

  • Loading branch information...
1 parent d00ca30 commit e64b889700060413bc1f31590053c0ef6fba6d2f @cdujeu cdujeu committed Sep 21, 2016
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/src/core/src/pydio/Core/Http/TopLevelRouter.php
@@ -26,6 +26,7 @@
use Pydio\Core\Exception\PydioException;
use Pydio\Core\Services\ConfService;
+use Pydio\Core\Utils\Vars\PathUtils;
use Zend\Diactoros\ServerRequestFactory;
defined('AJXP_EXEC') or die('Access not allowed');
@@ -104,7 +105,7 @@ public function getURIForRequest(ServerRequestInterface $request){
public function route(){
$request = ServerRequestFactory::fromGlobals();
- $this->base = rtrim(dirname($request->getServerParams()["SCRIPT_NAME"]), "/");
+ $this->base = rtrim(PathUtils::forwardSlashDirname($request->getServerParams()["SCRIPT_NAME"]), "/");
$dispatcher = \FastRoute\cachedDispatcher(function(RouteCollector $r) {
$this->configureRoutes($this->base, $r);

0 comments on commit e64b889

Please sign in to comment.