Merge branch 'ar/unlink-err'
* ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
This commit is contained in:
@ -252,7 +252,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;
|
||||
|
Reference in New Issue
Block a user