commit 27d0e5bd84bca09e4b202bc466a2098cc6447d31 from: Stefan Sperling date: Sat Jan 12 22:05:44 2019 UTC flush the file index after writing it commit - a5744d7100b84f5998fe87f7a2ff3637fd28be64 commit + 27d0e5bd84bca09e4b202bc466a2098cc6447d31 blob - 4562e971c3719cdb1db04abc44e8a19bd0de5a5b blob + efde946cb42b2abafa0232a0cccd5800bfa29f38 --- 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; }