journald: take corrupted files into account when calculating disk space

This commit is contained in:
Lennart Poettering
2012-03-15 03:01:09 +01:00
parent e7bf07b3d4
commit c042179388
+2 -1
View File
@@ -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)