mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-05 00:07:44 +02: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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user