]> err.no Git - systemd/commitdiff
journald: take corrupted files into account when calculating disk space
authorLennart Poettering <lennart@poettering.net>
Thu, 15 Mar 2012 02:00:11 +0000 (03:00 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 15 Mar 2012 02:01:09 +0000 (03:01 +0100)
src/journal/journald.c

index ee270e79af8a24b25912d6fafee7d8b48c9595c5..e5bcc2620399a5a0922408667c7f9a7934521e37 100644 (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)