From f8ae67fd783a64391d22084aca97a34fecbf139a Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sat, 23 May 2020 19:25:54 +0200 Subject: with -P, only list files that will be served --- hittpd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hittpd.c b/hittpd.c index 1f943de..0ff16ab 100644 --- a/hittpd.c +++ b/hittpd.c @@ -651,6 +651,9 @@ on_message_complete(http_parser *p) { if (fstatat(stream_fd, file, &ist, AT_SYMLINK_NOFOLLOW) < 0) continue; + if (only_public && !(ist.st_mode & S_IROTH)) + continue; + fprintf(stream, "", -- cgit 1.4.1