]> granicus.if.org Git - apache/commitdiff
mod_autoindex has a small bug when calling ap_readdir. This was
authorBill Stoddard <stoddard@apache.org>
Tue, 9 Nov 1999 03:41:11 +0000 (03:41 +0000)
committerBill Stoddard <stoddard@apache.org>
Tue, 9 Nov 1999 03:41:11 +0000 (03:41 +0000)
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

index 1077fe5c3530b2e1449179edc0b01e8a82c673fa..aeefbad8290d59d9848da2a4331cb52f2231e9c2 100644 (file)
@@ -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,