mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
If the system wgetrc has the `content-disposition = on` option, the file is actually saved as `PHP-Parser-5.0.0.tar.gz`, causing a subsequent failure. Even with `content-disposition = off`, if for any reason the download file already exists and is corrupted, it won't be overwritten, and a new file such as `v5.0.0.tar.gz.1` is saved instead. We solve both problems by enforcing the name of the downloaded file. Also, if for any other reason the unpacking should fail, remove the created directory to allow further attempts.