diff --git a/cake/console/libs/tasks/template.php b/cake/console/libs/tasks/template.php index 5f3f3a5fb..f4338234c 100644 --- a/cake/console/libs/tasks/template.php +++ b/cake/console/libs/tasks/template.php @@ -54,7 +54,7 @@ class TemplateTask extends Shell { function _findThemes() { $paths = App::path('shells'); $core = array_pop($paths); - $core = str_replace('libs' . DS, '', $core); + $core = preg_replace('#libs' . DS . '$#', '', $core); $paths[] = $core; $Folder =& new Folder($core . 'templates' . DS . 'default'); $contents = $Folder->read();