print unlink(2) errno in copy_or_link_directory
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
691f1a28bf
commit
f6a5f1bb50
@ -228,7 +228,8 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlink(dest->buf) && errno != ENOENT)
|
if (unlink(dest->buf) && errno != ENOENT)
|
||||||
die("failed to unlink %s", dest->buf);
|
die("failed to unlink %s: %s",
|
||||||
|
dest->buf, strerror(errno));
|
||||||
if (!option_no_hardlinks) {
|
if (!option_no_hardlinks) {
|
||||||
if (!link(src->buf, dest->buf))
|
if (!link(src->buf, dest->buf))
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user