Skip to content

Commit 177bdba

Browse files
committed
fix: filter correct var
1 parent a054e1b commit 177bdba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cron/rotate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export async function rotateLogs(db: DatabaseService) {
1717
const files = fs.readdirSync(LOGROTATE_DIRECTORY);
1818
const now = new Date().getTime();
1919
let logFiles = files.filter((file) => file.endsWith(LOGROTATE_SUFFIX));
20-
logFiles = files.filter((file) => {
20+
logFiles = logFiles.filter((file) => {
2121
const stats = fs.statSync(path.join(LOGROTATE_DIRECTORY, file));
2222
const endTime = stats.ctime.getTime() + LOGROTATE_AGE_MAX;
2323
const rotateFile =

0 commit comments

Comments
 (0)