Skip to content

Commit

Permalink
print unlink(2) errno in copy_or_link_directory
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Alex Riesen authored and Junio C Hamano committed Apr 30, 2009
1 parent 691f1a2 commit f6a5f1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builtin-clone.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ static void copy_or_link_directory(struct strbuf *src, struct strbuf *dest)
}

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 (!link(src->buf, dest->buf))
continue;
Expand Down

0 comments on commit f6a5f1b

Please sign in to comment.