aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-01-08 11:16:58 -0800
committerJunio C Hamano <gitster@pobox.com>2013-01-08 11:16:58 -0800
commit480640eafc88aee47a125bf514d95182c21be09d (patch)
tree0efeb31d38993eb8f5677cdf0eb5d30bc809adb3
parent59932be3446d757c813f17ea1701e9a731cde98b (diff)
parentf7be59b4770a8a8b76c1d0612db409ce7e8d11f2 (diff)
downloadgit-480640eafc88aee47a125bf514d95182c21be09d.tar.gz
git-480640eafc88aee47a125bf514d95182c21be09d.tar.xz
Merge branch 'jc/mkstemp-more-careful-error-reporting' into maint
* 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 68739aaa3..a066e2ee9 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);