summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-08-17 22:10:36 +0200
committerLennart Poettering <lennart@poettering.net>2012-08-17 22:10:36 +0200
commita0108012974558c5a7dcf8c76456be6a07b0e95d (patch)
tree98403c8602cef9085c045e6dd3f5a208106cc317
parentf982e6f7612401a9a789bb8f40d2adca34c85c10 (diff)
journal: be fine with opening rotated/corrupted journal files
-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 4d7a6ff17d..08d4285d0e 100644
--- a/src/journal/journal-file.c
+++ b/src/journal/journal-file.c
@@ -1957,7 +1957,8 @@ int journal_file_open(
(flags & O_ACCMODE) != O_RDWR)
return -EINVAL;
- if (!endswith(fname, ".journal"))
+ if (!endswith(fname, ".journal") &&
+ !endswith(fname, ".journal~"))
return -EINVAL;
f = new0(JournalFile, 1);