On Wed, Jun 28, 2017 at 08:30:13AM +0200, [email protected] wrote:
> commit 1e65a4848e04660ae4d4717777ef418993da6a7e
> Author:     Laslo Hunhold <[email protected]>
> AuthorDate: Wed Jun 28 08:29:31 2017 +0200
> Commit:     Laslo Hunhold <[email protected]>
> CommitDate: Wed Jun 28 08:29:31 2017 +0200
> 
>     Fix dir-check in dirent
>     
>     We cannot do this, as it falsely added a / to a link pointing to a
>     socket.
> 
> diff --git a/quark.c b/quark.c
> index 3c80be1..49cef68 100644
> --- 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;
> 

Sorry, *puppyeyes*.

Nice catch :)

-- 
Kind regards,
Hiltjo

Reply via email to