version 1.125, 2019/04/26 19:11:01 |
version 1.126, 2019/06/28 13:35:03 |
|
|
else { |
else { |
(void)unlink(dst); |
(void)unlink(dst); |
|
|
if ((fd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) < 0) |
if ((fd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) |
err(1, "%s", dst); |
err(1, "%s", dst); |
|
|
if (buf_write_fd(bp, fd) < 0) { |
if (buf_write_fd(bp, fd) < 0) { |
|
|
memset(&tv, 0, sizeof(tv)); |
memset(&tv, 0, sizeof(tv)); |
tv[0].tv_sec = rcs_rev_getdate(file, rev); |
tv[0].tv_sec = rcs_rev_getdate(file, rev); |
tv[1].tv_sec = tv[0].tv_sec; |
tv[1].tv_sec = tv[0].tv_sec; |
if (futimes(fd, (const struct timeval *)&tv) < 0) |
if (futimes(fd, (const struct timeval *)&tv) == -1) |
warn("utimes"); |
warn("utimes"); |
} |
} |
|
|