Adding extra protection to cake console be executed in driver root (windows).

This commit is contained in:
Juan Basso 2011-02-21 17:36:02 -03:00
parent 1f2afd8d3f
commit c5f291958b

View file

@ -263,7 +263,10 @@ class ShellDispatcher {
} }
$params['app'] = basename($params['app']); $params['app'] = basename($params['app']);
$params['working'] = rtrim($params['root'], '/') . '/' . $params['app']; $params['working'] = rtrim($params['root'], '/');
if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) {
$params['working'] .= '/' . $params['app'];
}
if (!empty($matches[0]) || !empty($isWin)) { if (!empty($matches[0]) || !empty($isWin)) {
$params = str_replace('/', '\\', $params); $params = str_replace('/', '\\', $params);