From 28f7869dee25de082045591fac0876323b062a64 Mon Sep 17 00:00:00 2001 From: schu Date: Mon, 20 Jun 2011 17:25:13 +0200 Subject: [PATCH] gitfo_read: fix read-loop Signed-off-by: schu --- src/fileops.c | 6 ++---- 1 file 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; }