mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-31 17:41:53 +02:00
Use OS specific directory separator in glob pattern and escape verbatim path segments
This commit is contained in:
@@ -101,7 +101,9 @@ class FinderFactory
|
||||
protected function isHidden(SplFileInfo $file): bool
|
||||
{
|
||||
return Glob::pattern(
|
||||
sprintf('%s/{%s}', $this->container->get('base_path'), $this->hiddenFiles()->implode(','))
|
||||
Glob::escape(
|
||||
$this->container->get('base_path') . DIRECTORY_SEPARATOR
|
||||
) . sprintf('{%s}', $this->hiddenFiles()->implode(','))
|
||||
)->matchStart($file->getRealPath());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user