]> granicus.if.org Git - apache/commitdiff
vetoing and backing out OtherBill's patch rev 1.91. This breaks
authorGreg Ames <gregames@apache.org>
Mon, 4 Feb 2002 21:19:08 +0000 (21:19 +0000)
committerGreg Ames <gregames@apache.org>
Mon, 4 Feb 2002 21:19:08 +0000 (21:19 +0000)
mod_autoindex on systems such as Unix where apr_dir_read doesn't automatically
return the filetype.  You see a '?' icon rather than a folder icon
for directories on 2.0.31 because mod_autoindex doesn't realize that the thing
is a directory.

No, we don't want more stat()s either.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93232 13f79535-47bb-0310-9956-ffa450edef68

modules/generators/mod_autoindex.c

index bef602ae2463e9681f2184675cdf3d83f118b626..aad5199b2b9f04d9818a6088b0048d871b1f2f7d 100644 (file)
@@ -1298,7 +1298,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
     }
 
     p = (struct ent *) apr_pcalloc(r->pool, sizeof(struct ent));
-    if (dirent->filetype == APR_DIR) {
+    if (rr->finfo.filetype == APR_DIR) {
         p->name = apr_pstrcat(r->pool, dirent->name, "/", NULL);
     }
     else {
@@ -1316,7 +1316,7 @@ static struct ent *make_autoindex_entry(const apr_finfo_t *dirent,
 
     if (autoindex_opts & (FANCY_INDEXING | TABLE_INDEXING)) {
         p->lm = rr->finfo.mtime;
-        if (dirent->filetype == APR_DIR) {
+        if (rr->finfo.filetype == APR_DIR) {
             if (autoindex_opts & FOLDERS_FIRST) {
                 p->isdir = 1;
             }