Fix dir-check in dirent

We cannot do this, as it falsely added a / to a link pointing to a
socket.
This commit is contained in:
Laslo Hunhold 2017-06-28 08:29:31 +02:00
parent c369738fa4
commit 1e65a4848e

View file

@ -387,7 +387,7 @@ senddir(int fd, char *name, struct request *r)
/* entry line */ /* entry line */
if (dprintf(fd, "<br />\n\t\t<a href=\"%s%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,
(e[i]->d_type & DT_DIR ? "/" : ""), (e[i]->d_type == DT_DIR) ? "/" : "",
e[i]->d_name, e[i]->d_name,
filetype(e[i]->d_type)) < 0) { filetype(e[i]->d_type)) < 0) {
s = S_REQUEST_TIMEOUT; s = S_REQUEST_TIMEOUT;