commit - 37e766f45c2e1cc637f4b0a0be03f125e65f8ebd
commit + 790ca73c1011a3aedd266ed382a84bd9a5094816
blob - 282cb62f59bcb339cdea4d7e7c5a4fe15c0e6900
blob + e0a659d9f3eedc5ed8dcbf7a9d8cf35c3de3f557
--- gotwebd/gotweb.c
+++ gotwebd/gotweb.c
if (r == -1)
goto done;
- if (qs != NULL) {
- if (qs->path != NULL) {
- char *epath;
+ if (qs->path != NULL) {
+ char *epath;
- if (fcgi_printf(c, " / ") == -1)
- goto done;
+ if (fcgi_printf(c, " / ") == -1)
+ goto done;
- err = gotweb_escape_html(&epath, qs->path);
- if (err)
- return err;
- r = gotweb_link(c, &(struct gotweb_url){
- .action = SUMMARY,
- .index_page = -1,
- .page = -1,
- .path = qs->path,
- }, "%s", epath);
- free(epath);
- if (r == -1)
- goto done;
- }
- if (qs->action != INDEX) {
- const char *action = "";
+ err = gotweb_escape_html(&epath, qs->path);
+ if (err)
+ return err;
+ r = gotweb_link(c, &(struct gotweb_url){
+ .action = SUMMARY,
+ .index_page = -1,
+ .page = -1,
+ .path = qs->path,
+ }, "%s", epath);
+ free(epath);
+ if (r == -1)
+ goto done;
+ }
+ if (qs->action != INDEX) {
+ const char *action = "";
- switch (qs->action) {
- case BLAME:
- action = "blame";
- break;
- case BRIEFS:
- action = "briefs";
- break;
- case COMMITS:
- action = "commits";
- break;
- case DIFF:
- action = "diff";
- break;
- case SUMMARY:
- action = "summary";
- break;
- case TAG:
- action = "tag";
- break;
- case TAGS:
- action = "tags";
- break;
- case TREE:
- action = "tree";
- break;
- }
-
- if (fcgi_printf(c, " / %s", action) == -1)
- goto done;
+ switch (qs->action) {
+ case BLAME:
+ action = "blame";
+ break;
+ case BRIEFS:
+ action = "briefs";
+ break;
+ case COMMITS:
+ action = "commits";
+ break;
+ case DIFF:
+ action = "diff";
+ break;
+ case SUMMARY:
+ action = "summary";
+ break;
+ case TAG:
+ action = "tag";
+ break;
+ case TAGS:
+ action = "tags";
+ break;
+ case TREE:
+ action = "tree";
+ break;
}
+
+ if (fcgi_printf(c, " / %s", action) == -1)
+ goto done;
}
fcgi_printf(c, "</div>\n" /* #site_path */