mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing path issues on Windows with bake, fixes #4495
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6946 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f5db95b22a
commit
f05a9399cb
1 changed files with 4 additions and 4 deletions
|
@ -442,7 +442,7 @@ class ShellDispatcher {
|
|||
$app = 'app';
|
||||
$root = dirname(dirname(dirname(__FILE__)));
|
||||
|
||||
$this->params = str_replace("\\", '/', $this->params);
|
||||
$this->params = str_replace('/', DS, $this->params);
|
||||
|
||||
if (!empty($this->params['working']) && (!isset($this->args[0]) || isset($this->args[0]) && $this->args[0]{0} !== '.')) {
|
||||
if (empty($this->params['app'])) {
|
||||
|
@ -455,7 +455,7 @@ class ShellDispatcher {
|
|||
}
|
||||
|
||||
if (!empty($this->params['app'])) {
|
||||
if($this->params['app']{0} == '/' || preg_match('/([a-z])(:)/i', $this->params['app'], $matches)) {
|
||||
if($this->params['app'][0] == DS || preg_match('/([a-z])(:)/i', $this->params['app'], $matches)) {
|
||||
$root = dirname($this->params['app']);
|
||||
}
|
||||
$app = basename($this->params['app']);
|
||||
|
@ -466,10 +466,10 @@ class ShellDispatcher {
|
|||
$this->params['webroot'] = 'webroot';
|
||||
}
|
||||
|
||||
$this->params = array_merge($this->params, array('app'=> $app, 'root'=> $root, 'working'=> $root . '/' . $app));
|
||||
$this->params = array_merge($this->params, array('app'=> $app, 'root'=> $root, 'working'=> $root . DS . $app));
|
||||
|
||||
if (!empty($matches[0])) {
|
||||
$this->params = str_replace('/', "\\", $this->params);
|
||||
$this->params = str_replace('/', DS, $this->params);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue