From 4eb7884f291940d72e622d427192c9a9d3c3c423 Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Fri, 31 Mar 2023 23:57:20 +0700 Subject: [PATCH] Incorrect log file rotation regex (#77) torrentpier/torrentpier#432 --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index 5d2f4ab6..2edbefd6 100644 --- a/common.php +++ b/common.php @@ -189,7 +189,7 @@ function file_write ($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $repla if ($max_size && @filesize($file) >= $max_size) { $old_name = $file; $ext = ''; - if (preg_match('#^(.+)(\.[^\\/]+)$#', $file, $matches)) + if (preg_match('#^(.+)(\.[^\\\/]+)$#', $file, $matches)) { $old_name = $matches[1]; $ext = $matches[2]; }