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) ...@@ -90,10 +90,8 @@ int gitfo_read(git_file fd, void *buf, size_t cnt)
continue; continue;
return git__throw(GIT_EOSERR, "Failed to read from file"); return git__throw(GIT_EOSERR, "Failed to read from file");
} }
if (!r) { if (!r)
errno = EPIPE; break;
return git__throw(GIT_EOSERR, "Failed to read from file");
}
cnt -= r; cnt -= r;
b += 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