1
0
Fork 0

Merge pull request #9158 from infabo/patch-1

Fix symlink check
pull/9323/head
Nils Adermann 2020-10-22 16:04:27 +02:00 committed by GitHub
commit dacc21e54f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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