From 7c3faefb29a3e0a4d75d244d2cd4427b8d13ff0f Mon Sep 17 00:00:00 2001 From: Bill Stoddard Date: Tue, 9 Nov 1999 03:41:11 +0000 Subject: [PATCH] mod_autoindex has a small bug when calling ap_readdir. This was causing empty indexes to be created. The following patch fixes this problem Submitted by: Paul Reder Reviewed by: Bill Stoddard git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@84111 13f79535-47bb-0310-9956-ffa450edef68 --- modules/generators/mod_autoindex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 1077fe5c35..aeefbad829 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1579,7 +1579,7 @@ static int index_directory(request_rec *r, * linked list and then arrayificate them so qsort can use them. */ head = NULL; - while (ap_readdir(d)) { + while (ap_readdir(d) == APR_SUCCESS) { char *d_name; ap_get_dir_filename(&d_name, d); p = make_autoindex_entry(d_name, autoindex_opts, -- 2.50.1