mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +01:00
[ticket/10663] Extension finder should not find subdirs with directory filter
The directory filter pattern now has a $ in the end, do avoid subdirectories from being matched as well. PHPBB3-10663
This commit is contained in:
parent
3762bf5e99
commit
41870c4095
@ -375,6 +375,10 @@ class phpbb_extension_finder
|
||||
{
|
||||
$directory_pattern = preg_quote(DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $directory) . DIRECTORY_SEPARATOR, '#');
|
||||
}
|
||||
if ($is_dir)
|
||||
{
|
||||
$directory_pattern .= '$';
|
||||
}
|
||||
$directory_pattern = '#' . $directory_pattern . '#';
|
||||
|
||||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST);
|
||||
|
Loading…
x
Reference in New Issue
Block a user