diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index dd29bb323..f3e444d59 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -139,8 +139,7 @@ abstract class ArchiveDownloader extends FileDownloader $renameAsOne = false; if (!file_exists($path)) { $renameAsOne = true; - } - if ($filesystem->isDirEmpty($path)) { + } elseif ($filesystem->isDirEmpty($path)) { try { if ($filesystem->removeDirectoryPhp($path)) { $renameAsOne = true;