summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-03-15 03:00:11 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-15 03:01:09 +0100
commitc042179388f329fb1e45b00e1a533a0dc27fb9ae (patch)
tree38b01954d02029560c203e28ca9f6e219dcada74
parente7bf07b3d444dddf67503df56acfbdbbe3e5261a (diff)
journald: take corrupted files into account when calculating disk space
-rw-r--r--src/journal/journald.c3
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)