diff --git a/src/Composer/Package/Archiver/ZipArchiver.php b/src/Composer/Package/Archiver/ZipArchiver.php index f8495e26b..5ab5bd55b 100644 --- a/src/Composer/Package/Archiver/ZipArchiver.php +++ b/src/Composer/Package/Archiver/ZipArchiver.php @@ -31,6 +31,11 @@ class ZipArchiver implements ArchiverInterface public function archive(string $sources, string $target, string $format, array $excludes = [], bool $ignoreFilters = false): string { $fs = new Filesystem(); + $sourcesRealpath = realpath($sources); + if (false !== $sourcesRealpath) { + $sources = $sourcesRealpath; + } + unset($sourcesRealpath); $sources = $fs->normalizePath($sources); $zip = new ZipArchive();