summaryrefslogtreecommitdiff
path: root/src/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileops.c')
-rw-r--r--src/fileops.c6
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;
}