summaryrefslogtreecommitdiff
path: root/streaming.c
diff options
context:
space:
mode:
Diffstat (limited to 'streaming.c')
-rw-r--r--streaming.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/streaming.c b/streaming.c
index 9afa66b8be..5892b50bd8 100644
--- a/streaming.c
+++ b/streaming.c
@@ -3,6 +3,7 @@
*/
#include "cache.h"
#include "streaming.h"
+#include "packfile.h"
enum input_source {
stream_error = -1,
@@ -539,7 +540,7 @@ int stream_blob_to_fd(int fd, const struct object_id *oid, struct stream_filter
kept = 0;
wrote = write_in_full(fd, buf, readlen);
- if (wrote != readlen)
+ if (wrote < 0)
goto close_and_exit;
}
if (kept && (lseek(fd, kept - 1, SEEK_CUR) == (off_t) -1 ||