diff options
| author | schu <schu-github@schulog.org> | 2011-06-20 17:25:13 +0200 |
|---|---|---|
| committer | schu <schu-github@schulog.org> | 2011-06-20 17:28:59 +0200 |
| commit | 28f7869dee25de082045591fac0876323b062a64 (patch) | |
| tree | be46052a7e2ea056d3f934afd26aeea5cd0efe93 /src/fileops.c | |
| parent | 24bd5e556bfb26978b721530c2daf038634c2078 (diff) | |
| download | libgit2-28f7869dee25de082045591fac0876323b062a64.tar.gz | |
gitfo_read: fix read-loop
Signed-off-by: schu <schu-github@schulog.org>
Diffstat (limited to 'src/fileops.c')
| -rw-r--r-- | src/fileops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/fileops.c b/src/fileops.c index c2a3ff0d3..2a5eb74ad 100644 --- a/src/fileops.c +++ b/src/fileops.c @@ -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; } |
