1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-10 09:02:59 +00:00

Skip directories in zip generation, empty dirs won't get archived

This seems ok as we currently rely on git generating archives which does
not archive empty directories either.
This commit is contained in:
Nils Adermann 2013-03-26 13:02:32 +01:00
parent deae50392f
commit 6066359944
3 changed files with 19 additions and 8 deletions

View file

@ -169,7 +169,7 @@ class ArchivableFilesFinderTest extends \PHPUnit_Framework_TestCase
protected function getArchivableFiles()
{
$files = array();
foreach ($this->finder->getIterator() as $file) {
foreach ($this->finder as $file) {
if (!$file->isDir()) {
$files[] = preg_replace('#^'.preg_quote($this->sources, '#').'#', '', $file->getRealPath());
}