fixed shell dispatcher failed unit test

This commit is contained in:
Val Bancer 2016-11-08 11:04:27 +01:00
parent 92e380737d
commit 7ffa7acea6

View file

@ -315,14 +315,14 @@ class ShellDispatcher {
} elseif (strpos($params['app'], '/')) { } elseif (strpos($params['app'], '/')) {
$params['root'] .= '/' . dirname($params['app']); $params['root'] .= '/' . dirname($params['app']);
} }
$isWindowsAppPath = $this->_isWindowsPath($params['app']);
$params['app'] = basename($params['app']); $params['app'] = basename($params['app']);
$params['working'] = rtrim($params['root'], '/'); $params['working'] = rtrim($params['root'], '/');
if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) { if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) {
$params['working'] .= '/' . $params['app']; $params['working'] .= '/' . $params['app'];
} }
if ($this->_isWindowsPath($params['app']) || !empty($isWin)) { if ($isWindowsAppPath || !empty($isWin)) {
$params = str_replace('/', '\\', $params); $params = str_replace('/', '\\', $params);
} }