From c042179388f329fb1e45b00e1a533a0dc27fb9ae Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 15 Mar 2012 03:00:11 +0100 Subject: journald: take corrupted files into account when calculating disk space --- src/journal/journald.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/journal/journald.c b/src/journal/journald.c index ee270e79af..e5bcc26203 100644 --- a/src/journal/journald.c +++ b/src/journal/journald.c @@ -165,7 +165,8 @@ static uint64_t available_space(Server *s) { if (!de) break; - if (!dirent_is_file_with_suffix(de, ".journal")) + if (!endswith(de->d_name, ".journal") && + !endswith(de->d_name, ".journal~")) continue; if (fstatat(dirfd(d), de->d_name, &st, AT_SYMLINK_NOFOLLOW) < 0) -- cgit v1.2.3-54-g00ecf