提交 be5e8501 编写于 作者: J Jonathan Nieder

Merge branch 'js/xread-in-full' into maint

* js/xread-in-full:
  stream_to_pack: xread does not guarantee to read all requested bytes
......@@ -114,7 +114,7 @@ static int stream_to_pack(struct bulk_checkin_state *state,
if (size && !s.avail_in) {
ssize_t rsize = size < sizeof(ibuf) ? size : sizeof(ibuf);
if (xread(fd, ibuf, rsize) != rsize)
if (read_in_full(fd, ibuf, rsize) != rsize)
die("failed to read %d bytes from '%s'",
(int)rsize, path);
offset += rsize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册