Commit 37653a13 authored by Duy Nguyen's avatar Duy Nguyen Committed by Junio C Hamano

copy.c: use error_errno()

Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 5cc026e2
......@@ -42,15 +42,15 @@ int copy_file(const char *dst, const char *src, int mode)
status = copy_fd(fdi, fdo);
switch (status) {
case COPY_READ_ERROR:
error("copy-fd: read returned %s", strerror(errno));
error_errno("copy-fd: read returned");
break;
case COPY_WRITE_ERROR:
error("copy-fd: write returned %s", strerror(errno));
error_errno("copy-fd: write returned");
break;
}
close(fdi);
if (close(fdo) != 0)
return error("%s: close error: %s", dst, strerror(errno));
return error_errno("%s: close error", dst);
if (!status && adjust_shared_perm(dst))
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment