projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
diff-files: show diffs with stage0 and unmerged stage at the same time.
[git.git]
/
copy.c
diff --git
a/copy.c
b/copy.c
index
2009275
..
e1cd5d0
100644
(file)
--- a/
copy.c
+++ b/
copy.c
@@
-10,10
+10,13
@@
int copy_fd(int ifd, int ofd)
if (!len)
break;
if (len < 0) {
if (!len)
break;
if (len < 0) {
+ int read_error;
if (errno == EAGAIN)
continue;
if (errno == EAGAIN)
continue;
+ read_error = errno;
+ close(ifd);
return error("copy-fd: read returned %s",
return error("copy-fd: read returned %s",
- strerror(
errno
));
+ strerror(
read_error
));
}
while (1) {
int written = write(ofd, buf, len);
}
while (1) {
int written = write(ofd, buf, len);