This can be replicated by running drush dl devel. During processing, the following files are created in the temp directory:

-rw------- 1 jhedstrom jhedstrom 9.9K 2012-04-04 11:17 develXNHcV4
-rw-rw-r-- 1 jhedstrom jhedstrom 182K 2012-04-04 11:17 drush_tmp_1333563462_4f7c90467c345devel-7.x-1.2.tar.gz
drwxrwxr-x 3 jhedstrom jhedstrom 4.0K 2012-04-04 11:17 drush_tmp_1333563462_4f7c90467c345

However, only

-rw------- 1 jhedstrom jhedstrom 9.9K 2012-04-04 11:17 develXNHcV4
drwxrwxr-x 3 jhedstrom jhedstrom 4.0K 2012-04-04 11:17 drush_tmp_1333563462_4f7c90467c345

are removed, leaving

-rw-rw-r-- 1 jhedstrom jhedstrom 182K 2012-04-04 11:17 drush_tmp_1333563462_4f7c90467c345devel-7.x-1.2.tar.gz

in place.

For a more dramatic demonstration, build a make file or two in the tests/makefiles directory.

I'm digging into this now.

CommentFileSizeAuthor
#2 drush-temp-files-1515384-02.patch870 bytesjhedstrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom’s picture

The pm-download problem is in wget.inc:

$path = drush_download_file($release['download_link'], $request['base_project_path'] . $filename, $max_age);

Where $request['base_project_path'] and $filename should have a '/' between them. Without this, it simply creates a new file that isn't registered for deletion.

jhedstrom’s picture

Status: Active » Needs review
FileSize
870 bytes

Tests are all passing locally with this patch.

jhedstrom’s picture

Status: Needs review » Closed (fixed)

Committed #2 in d03b2d3.