summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1421c5f)
raw | patch | inline | side by side (parent: 1421c5f)
author | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Jun 2008 05:02:12 +0000 (22:02 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 17 Jun 2008 05:02:12 +0000 (22:02 -0700) |
In a shared repository, we should make sure adjust_shared_perm() is called
after creating the initial fan-out directories under objects/ directory.
Earlier an logico called the function only when mkdir() failed; we should
do so when mkdir() succeeded.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
after creating the initial fan-out directories under objects/ directory.
Earlier an logico called the function only when mkdir() failed; we should
do so when mkdir() succeeded.
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 500584b6433d6827fee6099aee391caaa2aac800..e300562c158295e338e60e05ad02fa1a53c7a0a1 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
return 0;
}
-char * sha1_to_hex(const unsigned char *sha1)
+char *sha1_to_hex(const unsigned char *sha1)
{
static int bufno;
static char hexbuffer[4][50];
if (fd < 0 && dirlen) {
/* Make sure the directory exists */
buffer[dirlen-1] = 0;
- if (mkdir(buffer, 0777) && adjust_shared_perm(buffer))
+ if (mkdir(buffer, 0777) || adjust_shared_perm(buffer))
return -1;
/* Try again */