Fix writing to the wrong log file

This commit is contained in:
Vankka 2022-01-24 19:00:50 +02:00
parent 67e25a765a
commit 9662d9515f
No known key found for this signature in database
GPG Key ID: 6E50CB7A29B96AD0

View File

@ -72,7 +72,7 @@ public class DiscordSRVLogger implements Logger {
List<Path> logs = new ArrayList<>(amount);
for (int i = amount; i > 0; i--) {
Path log = logsDirectory.resolve(String.format(LOG_FILE_NAME_FORMAT, label, i));
logs.add(log);
logs.add(0, log);
if (!Files.exists(log)) {
continue;
}