magento-hackathon / magento-composer-installer

Composer installer for Magento modules
210 stars 154 forks source link

deleting a package leaves Vendor/Package directory in Magento world #121

Closed mage2-dev closed 9 years ago

mage2-dev commented 10 years ago

If a package/extension is installed with the inline composer.json extra-map information to e.g. app/code/Jay/Ext1, when I try to delete it, it deletes all the code inside the Ext1 directory, however, it doesn't delete Ext1 or Jay directory even though they are empty.

tkdb commented 10 years ago

Did you find a shell-command so far to delete empty directories?

mage2-dev commented 10 years ago

There is a code implementation on hackathon to read through the directory, and delete if empty. However, it feels like the logic is flawed a bit.

Its located at public function rmEmptyDirsRecursive($dir, $stopDir = null) in src/MagentoHackathon/Composer/Magento/Deploystrategy/DeploystrategyAbstract.php

tkdb commented 10 years ago

You can link the code as well ;) - https://github.com/magento-hackathon/magento-composer-installer/blob/master/src/MagentoHackathon/Composer/Magento/Deploystrategy/DeploystrategyAbstract.php#L386

Can you elaborate a bit on your feeling? What do you think is flawed or what does look fishy to you?

tkdb commented 10 years ago

I also wonder if using realpath here does conflict with symlinked directories, #122 .

Flyingmana commented 10 years ago

Please test if the fix resolves your Issue