From c45be0113438856b23ae7f552f8d8e507641713e Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Sat, 1 Jun 2024 15:46:40 +0200 Subject: [PATCH] Disable log directory recursion The exception log overview page currently displays all files that follow the same naming scheme, which is appropriate. However, it is possible for other log files with the same or similar naming schemes to be present in the log folder. For instance, in our case, we store log files with the same naming scheme in a subdirectory. This proposal addresses the issue because, at present, these files are included in the overview since the software reads the log directory recursively. --- .../install/files/lib/acp/page/ExceptionLogViewPage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php index 5cf1bec9e9..273851bffc 100644 --- a/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php @@ -103,7 +103,7 @@ class ExceptionLogViewPage extends MultipleLinkPage RegistryHandler::getInstance()->set('com.woltlab.wcf', 'exceptionMailerTimestamp', TIME_NOW); $fileNameRegex = new Regex('(?:^|/)\d{4}-\d{2}-\d{2}\.txt$'); - $this->logFiles = DirectoryUtil::getInstance(WCF_DIR . 'log/')->getFiles(\SORT_DESC, $fileNameRegex); + $this->logFiles = DirectoryUtil::getInstance(WCF_DIR . 'log/', false)->getFiles(\SORT_DESC, $fileNameRegex); if ($this->exceptionID) { // search the appropriate file -- 2.20.1