1
0
Fork 0

Avoid wiping the whole target package if download of the new one fails, refs #7929

pull/6942/head^2
Jordi Boggiano 2019-08-02 15:57:33 +02:00
parent 898ba6f869
commit 6a7220fed8
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 3 additions and 1 deletions

View File

@ -175,7 +175,9 @@ class FileDownloader implements DownloaderInterface, ChangeReportInterface
$reject = function ($e) use ($io, &$urls, $download, $fileName, $path, $package, &$retries, $filesystem, $self) { $reject = function ($e) use ($io, &$urls, $download, $fileName, $path, $package, &$retries, $filesystem, $self) {
// clean up // clean up
$filesystem->removeDirectory($path); if (file_exists($fileName)) {
$filesystem->unlink($fileName);
}
$self->clearLastCacheWrite($package); $self->clearLastCacheWrite($package);
if ($e instanceof TransportException) { if ($e instanceof TransportException) {