From 8983dd2800fc88c67c751fbdbd5c8d618c1001ee Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 22 Oct 2024 16:03:28 +0700 Subject: [PATCH] Fix greplog on force stopping --- .../java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java b/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java index c8ee474..fa8857b 100644 --- a/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java +++ b/src/main/java/me/chayapak1/chomens_bot/plugins/GrepLogPlugin.java @@ -49,7 +49,10 @@ public class GrepLogPlugin { final StringBuilder result = new StringBuilder(); for (Path filePath : fileList) { - if (!running) return; + if (!running) { + pattern = null; + return; + } if (count > 1_000_000) break;