aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-28 16:31:02 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-28 16:31:02 -0800
commitf474c526618d5d1111b585a6344e012fb731d3fe (patch)
tree6d73ae897c7d9eee9603ee1dfb88cc30e7444142
parent12ef3d84393025af044869be7de4c8e8aa1e025f (diff)
parent2c626e5fa8a46f647b88fb32d7b28d573e8631bf (diff)
downloadgit-f474c526618d5d1111b585a6344e012fb731d3fe.tar.gz
git-f474c526618d5d1111b585a6344e012fb731d3fe.tar.xz
Merge branch 'jc/maint-1.6.0-pack-directory'
* jc/maint-1.6.0-pack-directory: Fix odb_mkstemp() on AIX
-rw-r--r--wrapper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wrapper.c b/wrapper.c
index b07cdf299..d8efb1365 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);
}