diff --git a/WHATS_NEW b/WHATS_NEW index 53279ce04..7afe5d61e 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.03 - =================================== + Fix archive file expiration. Fix dmeventd build. Version 2.02.02 - 7th February 2006 diff --git a/lib/format_text/archive.c b/lib/format_text/archive.c index dcdbdef04..a13f1af45 100644 --- a/lib/format_text/archive.c +++ b/lib/format_text/archive.c @@ -207,8 +207,8 @@ static void _remove_expired(struct list *archives, uint32_t archives_size, /* Convert retain_days into the time after which we must retain */ retain_time = time(NULL) - (time_t) retain_days *SECS_PER_DAY; - /* Assume list is ordered oldest first (by index) */ - list_iterate_items(bf, archives) { + /* Assume list is ordered newest first (by index) */ + list_iterate_back_items(bf, archives) { /* Get the mtime of the file and unlink if too old */ if (stat(bf->path, &sb)) { log_sys_error("stat", bf->path);