Merge "Fix compatibility with recent releases of Gitweb."

This commit is contained in:
Shawn Pearce 2011-04-07 20:06:34 -07:00 committed by Android Code Review
commit 5f54791f09
2 changed files with 5 additions and 2 deletions

View File

@ -81,7 +81,8 @@ public class GitWebConfig {
}
final File pkgCgi = new File("/usr/lib/cgi-bin/gitweb.cgi");
String[] resourcePaths = {"/usr/share/gitweb", "/var/www"};
String[] resourcePaths = {"/usr/share/gitweb/static", "/usr/share/gitweb",
"/var/www/static", "/var/www"};
File cgi;
if (cfgCgi != null) {
@ -100,7 +101,8 @@ public class GitWebConfig {
// Assume the administrator pointed us to the distribution,
// which also has the corresponding CSS and logo file.
//
resourcePaths = new String[] {cgi.getParentFile().getAbsolutePath()};
String absPath = cgi.getParentFile().getAbsolutePath();
resourcePaths = new String[] {absPath + "/static", absPath};
}
} else if (pkgCgi.isFile() && pkgCgi.canExecute()) {

View File

@ -158,6 +158,7 @@ class GitWebServlet extends HttpServlet {
p.print("$favicon = 'favicon.ico';\n");
p.print("$logo = 'gitweb-logo.png';\n");
p.print("$javascript = 'gitweb.js';\n");
p.print("@stylesheets = ('gitweb-default.css');\n");
final File css = site.site_css;
if (css.isFile()) {