fix: correct log cleanup regex to match prefixed filenames

This commit is contained in:
Memory 2026-03-26 12:25:27 +08:00 committed by GitHub
parent c57741fcc5
commit 7600f82c34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -241,7 +241,7 @@ async function cleanup(): Promise<void> {
// 清理过期日志
const { maxLogDays = 7 } = await getAppConfig()
const maxAge = maxLogDays * 24 * 60 * 60 * 1000
const datePattern = /^\d{4}-\d{2}-\d{2}/
const datePattern = /\d{4}-\d{2}-\d{2}/
const logCleanup = logFiles
.filter((log) => {