diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-03-15 03:00:11 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-03-15 03:01:09 +0100 |
commit | c042179388f329fb1e45b00e1a533a0dc27fb9ae (patch) | |
tree | 38b01954d02029560c203e28ca9f6e219dcada74 /src/journal | |
parent | e7bf07b3d444dddf67503df56acfbdbbe3e5261a (diff) |
journald: take corrupted files into account when calculating disk space
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journald.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) |