Browse Source

ignore hidden files index

main
ghost 10 months ago
parent
commit
971baa9df2
  1. 10
      src/Dokuwiki/Filesystem.php

10
src/Dokuwiki/Filesystem.php

@ -223,10 +223,18 @@ class Filesystem @@ -223,10 +223,18 @@ class Filesystem
return false;
}
private function _index(string $path, ?array $blacklist = ['.', '..', 'sidebar.txt', '__template.txt']): void
private function _index(
string $path,
?array $blacklist = ['sidebar.txt', '__template.txt']
): void
{
foreach ((array) scandir($path) as $file)
{
if (str_starts_with($file, '.'))
{
continue;
}
if (in_array($file, $blacklist))
{
continue;

Loading…
Cancel
Save