From: Bill Stoddard Date: Tue, 9 Nov 1999 03:41:11 +0000 (+0000) Subject: mod_autoindex has a small bug when calling ap_readdir. This was X-Git-Tag: 1.3.10~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c3faefb29a3e0a4d75d244d2cd4427b8d13ff0f;p=apache 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 --- 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,