forked from ChomeNS/chomens-bot-java
i forgor the **VERY IMPORTANT** part
This commit is contained in:
parent
2d3f61b987
commit
3c1d06182c
1 changed files with 3 additions and 0 deletions
|
@ -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")) {
|
||||
|
|
Loading…
Reference in a new issue