Commit Diff
--- lib/fileindex.c +++ lib/fileindex.c @@ -333,6 +333,9 @@ got_fileindex_write(struct got_fileindex *fileindex, F if (n != sizeof(sha1)) return got_ferror(outfile, GOT_ERR_IO); + if (fflush(outfile) != 0) + return got_error_from_errno(); + return NULL; }