journal: actually set archived files to archived state

This commit is contained in:
Lennart Poettering 2012-07-17 00:55:02 +02:00
parent dc36ac6733
commit cd96b3b86a
1 changed files with 2 additions and 1 deletions

View File

@ -74,7 +74,8 @@ void journal_file_close(JournalFile *f) {
assert(f);
if (f->header) {
if (f->writable)
/* Mark the file offline. Don't override the archived state if it already is set */
if (f->writable && f->header->state == STATE_ONLINE)
f->header->state = STATE_OFFLINE;
munmap(f->header, PAGE_ALIGN(sizeof(Header)));