Commit 28f7869d by schu

gitfo_read: fix read-loop

Signed-off-by: schu <schu-github@schulog.org>
parent 24bd5e55
......@@ -90,10 +90,8 @@ int gitfo_read(git_file fd, void *buf, size_t cnt)
continue;
return git__throw(GIT_EOSERR, "Failed to read from file");
}
if (!r) {
errno = EPIPE;
return git__throw(GIT_EOSERR, "Failed to read from file");
}
if (!r)
break;
cnt -= r;
b += r;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment