commit 1e65a4848e04660ae4d4717777ef418993da6a7e
parent c369738fa4aa427d7e43e423917f5479970c6686
Author: Laslo Hunhold <dev@frign.de>
Date: Wed, 28 Jun 2017 08:29:31 +0200
Fix dir-check in dirent
We cannot do this, as it falsely added a / to a link pointing to a
socket.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quark.c b/quark.c
@@ -387,7 +387,7 @@ senddir(int fd, char *name, struct request *r)
/* entry line */
if (dprintf(fd, "<br />\n\t\t<a href=\"%s%s\">%s%s</a>",
e[i]->d_name,
- (e[i]->d_type & DT_DIR ? "/" : ""),
+ (e[i]->d_type == DT_DIR) ? "/" : "",
e[i]->d_name,
filetype(e[i]->d_type)) < 0) {
s = S_REQUEST_TIMEOUT;