From 630f56bae426e84b75ee522452a55501d6e4a795 Mon Sep 17 00:00:00 2001 From: Vincent Sylvester Date: Thu, 25 Jun 2020 18:05:12 +0200 Subject: [PATCH] Make sure log really works --- resources/DirectoryLister.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/resources/DirectoryLister.php b/resources/DirectoryLister.php index 54d88e661..a10451fd7 100644 --- a/resources/DirectoryLister.php +++ b/resources/DirectoryLister.php @@ -16,7 +16,7 @@ class DirectoryLister { // Define application version - const VERSION = '2.9.1'; + const VERSION = '2.9.2'; // Reserve some variables protected $_themeName = null; @@ -72,6 +72,11 @@ public function __construct() { $this->setSystemMessage('error', 'ERROR: Unable to read log file'); } else { touch($log); + if (file_exists($log) && is_writable($log)) { + $this->_logFile = $log; + } else { + $this->setSystemMessage('error', 'ERROR: Unable to read/create log file'); + } } if (filesize($log) <= 0) {