Merge "Fix compatibility with recent releases of Gitweb."
This commit is contained in:
commit
5f54791f09
|
@ -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()) {
|
||||
|
|
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue