help (mingw): Avoid current working directory when displaying html help

We should specify a working directory to ShellExecute for the
following reason.  ShellExecute uses the current working
directory if not told otherwise.  html.c did not override this
default.  Therefore the current working directory was in use as
long as the browser displaying the HTML help was open.  As long
as a directory is in use, it can't be deleted.

This commit changes help.c to avoid this problem.  The HTML
browser is launched in the root directory "\\".

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
This commit is contained in:
Steffen Prohaska
2007-11-25 17:48:17 +01:00
parent 0bac9037f2
commit 424e2045aa

2
help.c
View File

@@ -264,7 +264,7 @@ static void show_man_page(const char *git_cmd)
}
}
printf("Launching default browser to display HTML help ...\n");
ShellExecute(NULL, "open", htmlpath, NULL, NULL, 0);
ShellExecute(NULL, "open", htmlpath, NULL, "\\", 0);
}
#else
const char *page;