journal: be fine with opening rotated/corrupted journal files

This commit is contained in:
Lennart Poettering 2012-08-17 22:10:36 +02:00
parent f982e6f761
commit a010801297

View file

@ -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);