summaryrefslogtreecommitdiff
path: root/src/journal/journal-file.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-07-17 00:55:02 +0200
committerLennart Poettering <lennart@poettering.net>2012-07-17 00:59:03 +0200
commitcd96b3b86abb4a88cac2722bdfb6e5d4413f6831 (patch)
tree4ad23d8768fa3cf5b79a46ee99a8d9b4ae4f166e /src/journal/journal-file.c
parentdc36ac673356534b8b32c31e1892e55b8f891381 (diff)
journal: actually set archived files to archived state
Diffstat (limited to 'src/journal/journal-file.c')
-rw-r--r--src/journal/journal-file.c3
1 files changed, 2 insertions, 1 deletions
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)));