in the directory listing add / as suffix to save a redirect check
This commit is contained in:
parent
b6559eb3e7
commit
750f8381ce
1 changed files with 5 additions and 2 deletions
7
quark.c
7
quark.c
|
@ -381,8 +381,11 @@ senddir(int fd, char *name, struct request *r)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* entry line */
|
/* entry line */
|
||||||
if (dprintf(fd, "<br />\n\t\t<a href=\"%s\">%s%s</a>",
|
if (dprintf(fd, "<br />\n\t\t<a href=\"%s%s\">%s%s</a>",
|
||||||
e[i]->d_name, e[i]->d_name, filetype(e[i]->d_type)) < 0) {
|
e[i]->d_name,
|
||||||
|
e[i]->d_type & DT_DIR ? "/" : "",
|
||||||
|
e[i]->d_name,
|
||||||
|
filetype(e[i]->d_type)) < 0) {
|
||||||
s = S_REQUEST_TIMEOUT;
|
s = S_REQUEST_TIMEOUT;
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue