summaryrefslogtreecommitdiff
path: root/wrapper.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-03-01 00:31:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-03-01 00:31:02 (GMT)
commitf474c526618d5d1111b585a6344e012fb731d3fe (patch)
tree6d73ae897c7d9eee9603ee1dfb88cc30e7444142 /wrapper.c
parent12ef3d84393025af044869be7de4c8e8aa1e025f (diff)
parent2c626e5fa8a46f647b88fb32d7b28d573e8631bf (diff)
downloadgit-f474c526618d5d1111b585a6344e012fb731d3fe.zip
git-f474c526618d5d1111b585a6344e012fb731d3fe.tar.gz
git-f474c526618d5d1111b585a6344e012fb731d3fe.tar.bz2
Merge branch 'jc/maint-1.6.0-pack-directory'
* jc/maint-1.6.0-pack-directory: Fix odb_mkstemp() on AIX
Diffstat (limited to 'wrapper.c')
-rw-r--r--wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index b07cdf2..d8efb13 100644
--- a/wrapper.c
+++ b/wrapper.c
@@ -268,9 +268,10 @@ int odb_mkstemp(char *template, size_t limit, const char *pattern)
return fd;
/* slow path */
- safe_create_leading_directories(template);
+ /* some mkstemp implementations erase template on failure */
snprintf(template, limit, "%s/%s",
get_object_directory(), pattern);
+ safe_create_leading_directories(template);
return xmkstemp(template);
}