Skip to content

Commit

Permalink
fix: join path
Browse files Browse the repository at this point in the history
  • Loading branch information
mbystedt committed Jan 18, 2024
1 parent f74615b commit a054e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cron/rotate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function rotateLogs(db: DatabaseService) {
const now = new Date().getTime();
let logFiles = files.filter((file) => file.endsWith(LOGROTATE_SUFFIX));
logFiles = files.filter((file) => {
const stats = fs.statSync(file);
const stats = fs.statSync(path.join(LOGROTATE_DIRECTORY, file));
const endTime = stats.ctime.getTime() + LOGROTATE_AGE_MAX;
const rotateFile =
stats.size > 0 &&
Expand Down

0 comments on commit a054e1b

Please sign in to comment.