You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Paul J. Reder" <re...@raleigh.ibm.com> on 1999/11/08 20:35:17 UTC

[Patch]: Fix mod_autoindex to generate indexes again.

mod_autoindex has a small bug when calling ap_readdir. This was
causing empty indexes to be created. The following patch fixes
this problem.


-- 
Paul J. Reder
------------------------------------------------------------
"Remember, Information is not knowledge; Knowledge is not Wisdom;
Wisdom is not truth; Truth is not beauty; Beauty is not love;
Love is not music; Music is the best." -- Frank Zappa






--- mod_autoindexold.c  Mon Nov  8 14:26:13 1999
+++ mod_autoindex.c     Mon Nov  8 14:23:40 1999
@@ -1579,7 +1579,7 @@
      * 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,