Skip to content

Commit

Permalink
fix: FileCollection pseudo-regex
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed May 8, 2024
1 parent 907afc5 commit d57a5f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/Files/FileCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ final protected static function matchFiles(array $files, string $pattern): array
['\#', '\.', '.*', '.'],
$pattern
);
$pattern = "#{$pattern}#";
$pattern = "#\\A{$pattern}\\z#";
}

return array_filter($files, static fn ($value) => (bool) preg_match($pattern, basename($value)));
Expand Down

0 comments on commit d57a5f7

Please sign in to comment.