Commit Diff
- Commit:
5972d1ed77d4588ac24dca6fd010d64d0fd20aa9
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
- Message:
- do not forget to flush after writing a cached fulltext to a temporary file Fixes the following error during gotadmin pack -a: gotadmin: raw object has unexpected size
- Actions:
- Patch | Tree
--- lib/pack.c +++ lib/pack.c @@ -1393,6 +1393,8 @@ got_pack_dump_delta_chain_to_file(size_t *result_size, w = fwrite(fulltext, 1, fulltext_len, outfile); if (w != fulltext_len) return got_ferror(outfile, GOT_ERR_IO); + if (fflush(outfile) != 0) + return got_error_from_errno("fflush"); *result_size = fulltext_len; return NULL; }