diff --git a/commands/make/make.download.inc b/commands/make/make.download.inc index dbf3c3d..03210c9 100644 --- a/commands/make/make.download.inc +++ b/commands/make/make.download.inc @@ -334,14 +334,14 @@ function make_download_git($name, $download, $download_location) { // Move back to last current directory (first line). chdir($cwd); - // Remove .git/ directory if working-copy flag was not specified. - if (!$wc && file_exists($tmp_location . '/.git')) { - drush_delete_dir($tmp_location . '/.git', TRUE); - } - // Move the directory into the final resting location. drush_copy_dir($tmp_location, $download_location, TRUE); + // Remove .git/ directory if working-copy flag was not specified. + if (!$wc && file_exists($download_location . '/.git')) { + drush_register_file_for_deletion($download_location . '/.git'); + } + return dirname($tmp_location); }