New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure top-level files are also merged #1450

Merged
merged 1 commit into from Jul 31, 2015
Jump to file or symbol
Failed to load files and symbols.
+8 −3
Diff settings

Always

Just for now

Make sure top-level files are also merged

  • Loading branch information...
hanoii committed Jun 22, 2015
commit d10826132d72f8dabc10a396efe43319d4a5b316
@@ -670,10 +670,15 @@ function make_move_build($build_path) {
// To prevent the removal of top-level directories such as 'modules' or
// 'themes', descend in a level if the file exists.
// TODO: This only protects one level of directories from being removed.
$files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);
$overwrite = drush_get_option('overwrite', FALSE) ? FILE_EXISTS_OVERWRITE : FILE_EXISTS_MERGE;
foreach ($files as $file) {
$ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, $overwrite);
if (is_dir($destination)) {
$files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);
foreach ($files as $file) {
$ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, $overwrite);
}
}
else {
$ret = $ret && drush_copy_dir($file->filename, $destination, $overwrite);
}
}
else {
ProTip! Use n and p to navigate between commits in a pull request.