From 971baa9df2b6abe4657a249a011a2930b620ebb9 Mon Sep 17 00:00:00 2001 From: ghost Date: Thu, 8 Feb 2024 19:02:54 +0200 Subject: [PATCH] ignore hidden files index --- src/Dokuwiki/Filesystem.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Dokuwiki/Filesystem.php b/src/Dokuwiki/Filesystem.php index e9c5aaa..1455f02 100644 --- a/src/Dokuwiki/Filesystem.php +++ b/src/Dokuwiki/Filesystem.php @@ -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;