summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-01-02 10:38:25 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-02 10:38:25 -0800
commit9316f910f7f2435e617968ec6999fdf43d79b5f7 (patch)
tree6a468982becf62cfbe41ed2d3cc1fcc3fba604de
parentMerge branch 'jc/test-cvs-no-init-in-existing-dir' (diff)
parentxmkstemp(): avoid showing truncated template more carefully (diff)
downloadtgif-9316f910f7f2435e617968ec6999fdf43d79b5f7.tar.xz
Merge branch 'jc/mkstemp-more-careful-error-reporting'
After failing to create a temporary file using mkstemp(), failing pathname was not reported correctly on some platforms. * jc/mkstemp-more-careful-error-reporting: xmkstemp(): avoid showing truncated template more carefully
-rw-r--r--wrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index 68739aaa3b..a066e2ee9e 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -229,7 +229,7 @@ int xmkstemp(char *template)
int saved_errno = errno;
const char *nonrelative_template;
- if (!template[0])
+ if (strlen(template) != strlen(origtemplate))
template = origtemplate;
nonrelative_template = absolute_path(template);