diff --git a/at_core/adaptivetheme.drush.inc b/at_core/adaptivetheme.drush.inc index b75d594..1990f58 100644 --- a/at_core/adaptivetheme.drush.inc +++ b/at_core/adaptivetheme.drush.inc @@ -61,14 +61,15 @@ function drush_adaptivetheme($name = NULL, $machine_name = NULL) { $machine_name = preg_replace($search, '', $machine_name); // Determine the path to the new subtheme by finding the path to adaptivetheme. - $adaptivetheme_path = drush_locate_root() . '/' . drupal_get_path('theme', 'adaptivetheme'); + $adaptivetheme_path = drupal_get_path('theme', 'adaptivetheme'); $subtheme_path = explode('/', $adaptivetheme_path); array_pop($subtheme_path); array_pop($subtheme_path); $subtheme_path = implode('/', $subtheme_path) . '/' . str_replace('_', '-', $machine_name); // Make a fresh copy of the original subtheme. - drush_op('adaptivetheme_copy', $adaptivetheme_path . '/../' .'at_subtheme', $subtheme_path); + $adaptivetheme_path = preg_replace('/at_core/', '', $adaptivetheme_path); + drush_op('adaptivetheme_copy', $adaptivetheme_path .'at_subtheme', $subtheme_path); // Rename the .info file. $subtheme_info_file = $subtheme_path . '/' . $machine_name . '.info';