From 5d3eb00ae8383d87e1d2bafbdbbf28f3cf7651f7 Mon Sep 17 00:00:00 2001 From: Eduardo Morales Date: Tue, 21 Mar 2023 14:44:33 +0100 Subject: [PATCH 1/2] Remove dirname to get teh right path --- src/Behat/Context/LogsContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/Context/LogsContext.php b/src/Behat/Context/LogsContext.php index 9b74ed7..70b57e9 100644 --- a/src/Behat/Context/LogsContext.php +++ b/src/Behat/Context/LogsContext.php @@ -201,7 +201,7 @@ public static function writeTableLogs(array $grouped_logs) { */ public static function writeReport(array $grouped_logs) { // Add date to report. - $source_dir = dirname(static::$path); + $source_dir = static::$path; $date = date_create(); $time = date_format($date, "Y-m-d-H-i-s"); $source_file = $source_dir . '/dblog-report-' . $time . '.csv'; From b66d105b03d9ea3a10623ae6e30249354df268f8 Mon Sep 17 00:00:00 2001 From: Eduardo Morales Date: Wed, 22 Mar 2023 08:12:01 +0100 Subject: [PATCH 2/2] Change the permissions folders --- src/Behat/Context/LogsContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Behat/Context/LogsContext.php b/src/Behat/Context/LogsContext.php index 70b57e9..66dbd8d 100644 --- a/src/Behat/Context/LogsContext.php +++ b/src/Behat/Context/LogsContext.php @@ -206,7 +206,7 @@ public static function writeReport(array $grouped_logs) { $time = date_format($date, "Y-m-d-H-i-s"); $source_file = $source_dir . '/dblog-report-' . $time . '.csv'; if (!file_exists($source_dir)) { - mkdir($source_dir, 0664, TRUE); + mkdir($source_dir, 0777, TRUE); } if (is_writable($source_dir)) { // Open CSV.