Skip to content

Commit 1e4966c

Browse files
Get realpath for ZipArchive (#11636)
1 parent 7a7f364 commit 1e4966c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Composer/Package/Archiver/ZipArchiver.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ class ZipArchiver implements ArchiverInterface
3131
public function archive(string $sources, string $target, string $format, array $excludes = [], bool $ignoreFilters = false): string
3232
{
3333
$fs = new Filesystem();
34+
$sourcesRealpath = realpath($sources);
35+
if (false !== $sourcesRealpath) {
36+
$sources = $sourcesRealpath;
37+
}
38+
unset($sourcesRealpath);
3439
$sources = $fs->normalizePath($sources);
3540

3641
$zip = new ZipArchive();

0 commit comments

Comments
 (0)