From 6cb0aff4173cf7f63b064c85c5ccf273ec6d747a Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Mon, 2 Nov 2020 13:45:34 +0100 Subject: [PATCH] Fix issue preventing cleanup of vendor dir when it is nested in the install path on Windows, fixes #9396 --- src/Composer/Downloader/ArchiveDownloader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Downloader/ArchiveDownloader.php b/src/Composer/Downloader/ArchiveDownloader.php index ba19aa58b..66b075772 100644 --- a/src/Composer/Downloader/ArchiveDownloader.php +++ b/src/Composer/Downloader/ArchiveDownloader.php @@ -51,7 +51,7 @@ abstract class ArchiveDownloader extends FileDownloader // clean up the target directory, unless it contains the vendor dir, as the vendor dir contains // the archive to be extracted. This is the case when installing with create-project in the current directory // but in that case we ensure the directory is empty already in ProjectInstaller so no need to empty it here. - if (false === strpos($this->filesystem->normalizePath($vendorDir), $this->filesystem->normalizePath($path).DIRECTORY_SEPARATOR)) { + if (false === strpos($this->filesystem->normalizePath($vendorDir), $this->filesystem->normalizePath($path.DIRECTORY_SEPARATOR))) { $this->filesystem->emptyDirectory($path); }