diff --git a/src/Composer/Package/Archiver/ArchivableFilesFinder.php b/src/Composer/Package/Archiver/ArchivableFilesFinder.php index 150e5f48e..4a8042abe 100644 --- a/src/Composer/Package/Archiver/ArchivableFilesFinder.php +++ b/src/Composer/Package/Archiver/ArchivableFilesFinder.php @@ -43,7 +43,7 @@ class ArchivableFilesFinder extends \FilterIterator { $fs = new Filesystem(); - $sources = $fs->normalizePath($sources); + $sources = $fs->normalizePath(realpath($sources)); if ($ignoreFilters) { $filters = array(); @@ -58,7 +58,7 @@ class ArchivableFilesFinder extends \FilterIterator $this->finder = new Finder(); $filter = function (\SplFileInfo $file) use ($sources, $filters, $fs) { - if ($file->isLink() && strpos($file->getLinkTarget(), $sources) !== 0) { + if ($file->isLink() && strpos($file->getRealPath(), $sources) !== 0) { return false; }