diff --git a/src/Composer/Repository/ArtifactRepository.php b/src/Composer/Repository/ArtifactRepository.php index 374f04cea..2383b2dd3 100644 --- a/src/Composer/Repository/ArtifactRepository.php +++ b/src/Composer/Repository/ArtifactRepository.php @@ -129,11 +129,15 @@ class ArtifactRepository extends ArrayRepository implements ConfigurableReposito $zip->open($file->getPathname()); if (0 == $zip->numFiles) { + $zip->close(); + return false; } $foundFileIndex = $this->locateFile($zip, 'composer.json'); if (false === $foundFileIndex) { + $zip->close(); + return false; }