fix: Actually keep 5 log files

This commit is contained in:
Ahmad Ansori Palembani 2024-12-06 18:51:46 +07:00
parent 5396b0408e
commit 2c36be8b8f
Signed by: null2264
GPG key ID: BA64F8B60AF3EFB6

View file

@ -146,7 +146,7 @@ class RollingUniFileLogWriter(
} }
.orEmpty() .orEmpty()
.sortedByDescending { it.name } .sortedByDescending { it.name }
.drop(maxLogFiles - 1) .drop(maxLogFiles)
.forEach { .forEach {
it.delete() it.delete()
dupes[it.name]?.forEach { f -> f.delete() } dupes[it.name]?.forEach { f -> f.delete() }