Commit Diff


commit - 76cbc7c5854f28fb476b6c80d69163c6a0796725
commit + 6048158fc378dddeded29923f96cb5858c1cb71d
blob - 5382bfa4ce515844b94eb435c8ca4837f41a7e92
blob + a4a1392d2f43c778cb84a823427774c092088fa8
--- lib/pack.c
+++ lib/pack.c
@@ -1396,6 +1396,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;
 		}