1
0
Fork 0

Don't put dots in archive filenames they cause problems with PharData

composer/satis#114
pull/2666/merge
Nils Adermann 2014-02-04 12:24:59 +01:00
parent a90a05a059
commit 7566315c7a
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class ArchiveManager
*/ */
public function getPackageFilename(PackageInterface $package) public function getPackageFilename(PackageInterface $package)
{ {
$nameParts = array(preg_replace('#[^a-z0-9-_.]#i', '-', $package->getName())); $nameParts = array(preg_replace('#[^a-z0-9-_]#i', '-', $package->getName()));
if (preg_match('{^[a-f0-9]{40}$}', $package->getDistReference())) { if (preg_match('{^[a-f0-9]{40}$}', $package->getDistReference())) {
$nameParts = array_merge($nameParts, array($package->getDistReference(), $package->getDistType())); $nameParts = array_merge($nameParts, array($package->getDistReference(), $package->getDistType()));