diff options
| author | Vicent Martà <tanoku@gmail.com> | 2011-06-21 13:53:48 -0700 |
|---|---|---|
| committer | Vicent Martà <tanoku@gmail.com> | 2011-06-21 13:53:48 -0700 |
| commit | 3bf3ad9f03b32fe52b5bb78a0e9a0e0303ddc470 (patch) | |
| tree | a6bd9600526827fbe0226d611667acb98fda608f /src | |
| parent | b3f2d4cb36bc067c5ad512d3075e38614a32809d (diff) | |
| parent | 28f7869dee25de082045591fac0876323b062a64 (diff) | |
| download | libgit2-3bf3ad9f03b32fe52b5bb78a0e9a0e0303ddc470.tar.gz | |
Merge pull request #269 from schu/infinite-append
gitfo_read: fix read-loop
Diffstat (limited to 'src')
| -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; } |
