THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

copy.c: use error_errno()

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tags/v2.9.0-rc0
Nguyễn Thái Ngọc Duy Junio C Hamano 3 years ago
parent
commit
37653a130a
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      copy.c

+ 3
- 3
copy.c View File

@@ -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;

Loading…
Cancel
Save