Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm not sure yet myself it this is a bug or not, but in case you choose to remove all files, possible leftovers could be in the directory.
EG, the first time, I exported everything and got a demo.pipelines.inc file. The second time, I used the selection mode and removed the pipelines exportables, but the file was still there. Should we remove this or not, that's the question now.
Comment | File | Size | Author |
---|---|---|---|
#17 | 1498276-17.patch | 2.97 KB | damiankloip |
#16 | 1498276-16.patch | 2.97 KB | damiankloip |
#15 | 1498276-13.patch | 2.97 KB | damiankloip |
#13 | 1498276-12.patch | 2.98 KB | damiankloip |
#11 | 1498276-11.patch | 2.97 KB | damiankloip |
Comments
Comment #1
damiankloip CreditAttribution: damiankloip commentedI would say that at least as a default if the module is being overwritten the file should be removed. It should be treated as a new module I think. We could also add another --option to the command for other use cases?
Comment #2
swentel CreditAttribution: swentel commentedYeah, default should remove all, I'll post a patch soon.
Comment #3
damiankloip CreditAttribution: damiankloip commentedNice! :) In the CTools queue? Are we going to go with an additional option too? I think that is a good plan.
Comment #4
swentel CreditAttribution: swentel commentedHmm, not sure about the queue, in a way, I like the fact that we can discuss an experiment here without disturbing merlin with dozens of emails :)
The option is a good idea, I'll put that in as well. Let me know what you prefer re: the queue, it's all the same for me actually.
Comment #5
damiankloip CreditAttribution: damiankloip commentedThat's a good point, maybe here is a good testbed for functionality. We can play around a bit more :) The "No pengiuns were harmed" patch is on the ctools 7.x-dev branch!
Comment #6
swentel CreditAttribution: swentel commentedThis should do it.
Comment #7
damiankloip CreditAttribution: damiankloip commentedDoes the logic need to be more like this? Otherwise, I'm confsued :) See in this patch too - Shall we use the spl DirectoryIterator instead?
Comment #8
swentel CreditAttribution: swentel commentedHmm, you're right. Like the spl DirectoryIterator as well, much cleaner than using strpos. Couple of nitpicks:
After some thinking, it probably makes more sense to rename the variable to something like 'remove', no ? Because, it used to overwrite, now, it first removes them all and creates them again.
No !module placeholder in the string.
Other than that, I like!
Comment #9
damiankloip CreditAttribution: damiankloip commentedCool, I think we are agreed then. I will re roll a patch with the amends/fixes from #8. Shall we change the name of the option from --overwrite to --remove too?
Comment #10
swentel CreditAttribution: swentel commentedYes, all overwrite to remove should be fine.
Comment #11
damiankloip CreditAttribution: damiankloip commentedOk, agreed on this patch?
Comment #12
swentel CreditAttribution: swentel commentedoverwrite should be remove.
Other than that, looks good.
Comment #13
damiankloip CreditAttribution: damiankloip commentedBut sticking to the _drush_ctools format of function names...
Comment #14
damiankloip CreditAttribution: damiankloip commentedbah! You are right. One sec :)
Comment #15
damiankloip CreditAttribution: damiankloip commentedmaybe now?
Comment #16
damiankloip CreditAttribution: damiankloip commentedOK, This is THE one :)
Comment #17
damiankloip CreditAttribution: damiankloip commentedWith logic fixed, for file unlinking (my fault!)
Comment #18
swentel CreditAttribution: swentel commentedYES!
Comment #19
damiankloip CreditAttribution: damiankloip commentedComment #20
damiankloip CreditAttribution: damiankloip commentedCommitted to 7.x-1.x