summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 010a2da)
raw | patch | inline | side by side (parent: 010a2da)
author | Patrick Higgins <patrick.higgins@cexp.com> | |
Mon, 23 Jun 2008 21:33:41 +0000 (15:33 -0600) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 23 Jun 2008 23:13:38 +0000 (16:13 -0700) |
The AIX mkstemp will modify it's template parameter to an empty string if
the call fails. This caused a subsequent mkdir to fail.
Signed-off-by: Patrick Higgins <patrick.higgins@cexp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
the call fails. This caused a subsequent mkdir to fail.
Signed-off-by: Patrick Higgins <patrick.higgins@cexp.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c | patch | blob | history |
diff --git a/sha1_file.c b/sha1_file.c
index 191f814e09ee6067edf7b0acc73a04751e73a6da..92299ed622b802da0f40bcdcdc9fbcadd958c7a2 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
fd = mkstemp(buffer);
if (fd < 0 && dirlen) {
/* Make sure the directory exists */
+ memcpy(buffer, filename, dirlen);
buffer[dirlen-1] = 0;
if (mkdir(buffer, 0777) || adjust_shared_perm(buffer))
return -1;