Commit Diff


commit - ac488a0337e8689e972f5f3ae4f79f7a964776df
commit + 5972d1ed77d4588ac24dca6fd010d64d0fd20aa9
blob - b48c1a816df9f8131038bba282e7b4e86dedb373
blob + 7a9c336d77eb95e144f6d99eed2c9a27b1c17612
--- 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;
 		}