Fix issue preventing cleanup of vendor dir when it is nested in the install path on Windows, fixes #9396

main
Jordi Boggiano 4 years ago
parent feb667e9bd
commit 6cb0aff417
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC

@ -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);
}

Loading…
Cancel
Save