From e9d8b9207e7ae7be0cf33a7cdc18d0e14c12c02a Mon Sep 17 00:00:00 2001 From: Steffen Prohaska Date: Sat, 17 Nov 2007 16:43:13 +0100 Subject: [PATCH] help: search html documentation relativ to git_exec_dir() Global gitconfig and templates are searched relativ to git_exec_dir() to make the installation relocatable. This commit changes help to do the same for finding the html documentation. Signed-off-by: Steffen Prohaska --- help.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/help.c b/help.c index 90d5a03345..f89164a760 100644 --- a/help.c +++ b/help.c @@ -245,15 +245,16 @@ static void show_man_page(const char *git_cmd) { #ifdef __MINGW32__ { + const char* exec_path = git_exec_path(); char *htmlpath = make_native_separator( - mkpath("%s/doc/git/html/%s.html" - , git_install_prefix() - , git_cmd) + mkpath("%s/../doc/git/html/%s.html" + , exec_path + , git_cmd) ); if (!file_exists(htmlpath)) { htmlpath = make_native_separator( - mkpath("%s/doc/git/html/git-%s.html" - , git_install_prefix() + mkpath("%s/../doc/git/html/git-%s.html" + , exec_path , git_cmd) ); if (!file_exists(htmlpath)) {