Skip to content

Commit 700612c

Browse files
committed
fix: FileCollection pseudo-regex
1 parent 460d3df commit 700612c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

system/Files/FileCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ final protected static function matchFiles(array $files, string $pattern): array
105105
['\#', '\.', '.*', '.'],
106106
$pattern
107107
);
108-
$pattern = "#{$pattern}#";
108+
$pattern = "#\\A{$pattern}\\z#";
109109
}
110110

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

0 commit comments

Comments
 (0)