Hey Drush team!

Briefly, briefly only: Since when doesn't Drush delete files & folders anymore? E.g. I have realised that my test file 'testfile.txt' in module 'Foo' doesn't get removed by Drush's core command 'dl' [anymore]!

This behaviour can cause severe problems -- in my case it left an outdated inc-file in the module folder 'mimemail' with the result of a complete site crash.

I seem to have not payed attention enough before, but I am sure that I used to think Drush deletes the whole module folder before it downloads/updates!?!?

Thanks, team! I am referring, btw, to the version 'All-versions-5.x-dev (2011-Oct-19)'.

Comments

greg.1.anderson’s picture

Hmmm....

$ drush dl views
Project views (7.x-3.0-rc1) downloaded to /home/ga/tmp/test/views.                                    [success]
Project views contains 2 modules: views, views_ui.
$ echo blah > views/test.txt
$ drush dl views
Install location /home/ga/tmp/test/views already exists. Do you want to overwrite it? (y/n): y
Project views (7.x-3.0-rc1) downloaded to /home/ga/tmp/test/views.                                    [success]
Project views contains 2 modules: views, views_ui.
$ cat views/test.txt
blah

This certainly seems wrong to me. I cannot answer the question (when did this happen), but I don't think it happened on purpose. I tried the same test on 4.x-dev, and the spurious file was correctly removed.

greg.1.anderson’s picture

git bisect to the rescue?

Blooniverse’s picture

Greg, are you addressing me? :)

greg.1.anderson’s picture

Assigned: Unassigned » owen barton

@the_phi: I was addressing any motivated individual who might pick up this issue before I had a chance to get to it. Owen began a big rewrite of the pm code yesterday, so I'm assigning this to him. I'll bet that his new code will correctly remove old files during drush dl.

jonhattan’s picture

jonhattan’s picture

Version: » All-versions-4.x-dev
Assigned: owen barton » msonnabaum
Status: Fixed » Patch (to be ported)
msonnabaum’s picture

Status: Patch (to be ported) » Fixed

Closing since #996420 won't be backported.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Nicer formatting.