From: Lennart Poettering Date: Thu, 15 Mar 2012 02:00:11 +0000 (+0100) Subject: journald: take corrupted files into account when calculating disk space X-Git-Tag: v44~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c042179388f329fb1e45b00e1a533a0dc27fb9ae;p=systemd journald: take corrupted files into account when calculating disk space --- diff --git a/src/journal/journald.c b/src/journal/journald.c index ee270e79..e5bcc262 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)