Fix GitWeb Caching

GitWeb Caching won't work when its cgi file is executed from outside.
Same approach will also work with vanilla GitWeb.

Change-Id: I9ee93337f492eceb520273d71295a0d16631f718
Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
This commit is contained in:
Dariusz Luksza
2013-01-17 17:05:44 +01:00
parent a32422733a
commit 17ed969b4d

View File

@@ -416,7 +416,8 @@ class GitWebServlet extends HttpServlet {
final Repository repo) throws IOException {
final Process proc =
Runtime.getRuntime().exec(new String[] {gitwebCgi.getAbsolutePath()},
makeEnv(req, project), repo.getDirectory());
makeEnv(req, project),
gitwebCgi.getAbsoluteFile().getParentFile());
copyStderrToLog(proc.getErrorStream());
if (0 < req.getContentLength()) {