threads / patch / 19128

patchprint unlink(2) errno in copy_or_link_directory

Subject: [PATCH] print unlink(2) errno in copy_or_link_directory

## tl;dr

One message between Apr 29, 2009 and Apr 29, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Alex Riesen· Apr 29, 2009, 21:24 UTC · lore
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
 builtin-clone.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to builtin-clone.c +2 −1
diff --git a/builtin-clone.c b/builtin-clone.c
index 880373f..ba286e0 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -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;
-- 
1.6.3.rc3.39.g49fd5

← back to recent threads