Skip to content

Commit

Permalink
SplFileInfo: getRealPath can return false in ArchivableFilesFinder (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
glaubinix committed Mar 29, 2022
1 parent 37627f1 commit 1fff47b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Package/Archiver/ArchivableFilesFinder.php
Expand Up @@ -58,7 +58,7 @@ public function __construct(string $sources, array $excludes, bool $ignoreFilter
$this->finder = new Finder();

$filter = function (\SplFileInfo $file) use ($sources, $filters, $fs): bool {
if ($file->isLink() && strpos($file->getRealPath(), $sources) !== 0) {
if ($file->isLink() && ($file->getRealPath() === false || strpos($file->getRealPath(), $sources) !== 0)) {
return false;
}

Expand Down

0 comments on commit 1fff47b

Please sign in to comment.