summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bfb73b2)
raw | patch | inline | side by side (parent: bfb73b2)
author | Petr Baudis <pasky@suse.cz> | |
Tue, 20 Sep 2005 00:19:50 +0000 (02:19 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 20 Sep 2005 00:41:13 +0000 (17:41 -0700) |
The base target directory for the templates copying was initialized
to git_dir, but git_dir[len] is not zero but / at the time we do the
initialization. This is not what we want for our target directory string
since we pass it to mkdir(), so make it zero-terminated manually.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
to git_dir, but git_dir[len] is not zero but / at the time we do the
initialization. This is not what we want for our target directory string
since we pass it to mkdir(), so make it zero-terminated manually.
Signed-off-by: Petr Baudis <pasky@suse.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
init-db.c | patch | blob | history |
diff --git a/init-db.c b/init-db.c
index 902bdfaafb53e15382c901936a1ccd2fec90f0f3..da2bc8f42b2ea6804c79097778f3105afcd87da6 100644 (file)
--- a/init-db.c
+++ b/init-db.c
}
memcpy(path, git_dir, len);
+ path[len] = 0;
copy_templates_1(path, len,
template_path, template_len,
dir);