mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2026-04-18 08:00:31 +08:00
fix: correct log cleanup regex to match prefixed filenames
This commit is contained in:
parent
c57741fcc5
commit
7600f82c34
@ -241,7 +241,7 @@ async function cleanup(): Promise<void> {
|
|||||||
// 清理过期日志
|
// 清理过期日志
|
||||||
const { maxLogDays = 7 } = await getAppConfig()
|
const { maxLogDays = 7 } = await getAppConfig()
|
||||||
const maxAge = maxLogDays * 24 * 60 * 60 * 1000
|
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
|
const logCleanup = logFiles
|
||||||
.filter((log) => {
|
.filter((log) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user