From cd96b3b86abb4a88cac2722bdfb6e5d4413f6831 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 17 Jul 2012 00:55:02 +0200 Subject: journal: actually set archived files to archived state --- src/journal/journal-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 180b43a9c5..d8ce495d86 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -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))); -- cgit v1.2.3-54-g00ecf