From 3c1d06182cf1455ff34eaac310c2e934094d9903 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Fri, 31 Mar 2023 15:01:31 +0700 Subject: [PATCH] i forgor the **VERY IMPORTANT** part --- .../chipmunk/chayapak/chomens_bot/plugins/GrepLogPlugin.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/GrepLogPlugin.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/GrepLogPlugin.java index 951b3d9..8287e76 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/GrepLogPlugin.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/plugins/GrepLogPlugin.java @@ -10,6 +10,7 @@ import net.kyori.adventure.text.format.NamedTextColor; import java.io.*; import java.nio.charset.StandardCharsets; import java.util.Arrays; +import java.util.Comparator; import java.util.regex.Pattern; import java.util.zip.GZIPInputStream; @@ -71,6 +72,8 @@ public class GrepLogPlugin { final File[] fileList = Logger.logDir.listFiles(); + Arrays.sort(fileList, Comparator.comparing(File::getName)); // VERY IMPORTANT + for (File file : fileList) { final String fileName = file.getName(); if (fileName.matches(".*\\.txt\\.gz")) {