fixing paths in shell

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5080 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2007-05-13 22:25:40 +00:00
parent aca2ccf3bb
commit 172492963e

View file

@ -400,11 +400,15 @@ class ShellDispatcher {
} else {
$app = 'app';
}
if(isset($this->params['app'])) {
if($this->params['app']{0} == '/') {
$this->params['working'] = $this->params['app'];
unset($this->params['app']);
$app = basename($this->params['working']);
} else {
$app = $this->params['app'];
$this->params['working'] = dirname(dirname(dirname(__FILE__)));
}
}