Skip to content

Commit dc97693

Browse files
author
florian030
committed
fixed last commit
1 parent f6d3c92 commit dc97693

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/lib/classes/cron.d/200-logfiles.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public function onRunJob() {
121121

122122
// rename older files (move up by one)
123123
$num = $log_retention;
124-
while($num >= 1 && is_file($cron_logfile . '.' . $num . '.gz')) {
125-
rename($cron_logfile . '.' . $num . '.gz', $cron_logfile . '.' . ($num + 1) . '.gz');
124+
while($num >= 1) {
125+
if(is_file($cron_logfile . '.' . $num . '.gz')) rename($cron_logfile . '.' . $num . '.gz', $cron_logfile . '.' . ($num + 1) . '.gz');
126126
$num--;
127127
}
128128

0 commit comments

Comments
 (0)