Skip external symlinks when creating PHAR archive
parent
ac497feaba
commit
24f0f32543
|
@ -52,6 +52,10 @@ class ArchivableFilesFinder extends \FilterIterator
|
|||
$this->finder = new Finder\Finder();
|
||||
|
||||
$filter = function (\SplFileInfo $file) use ($sources, $filters, $fs) {
|
||||
if ($file->isLink() && strpos($file->getLinkTarget(), $sources) !== 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$relativePath = preg_replace(
|
||||
'#^'.preg_quote($sources, '#').'#',
|
||||
'',
|
||||
|
|
Loading…
Reference in New Issue