From 91bcbc77b33bcda2263fba6a4ad77484d4eb24cb Mon Sep 17 00:00:00 2001 From: Guido Berhoerster Date: Sat, 20 Jul 2013 00:35:11 +0200 Subject: [PATCH] Include hidden files in router_xmldir directory listing Hidden files can be filtered out through a XSL stylesheet if needed. --- plugins/router_xmldir/router_xmldir.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/router_xmldir/router_xmldir.c b/plugins/router_xmldir/router_xmldir.c index 2367d89e..bdf693dc 100644 --- a/plugins/router_xmldir/router_xmldir.c +++ b/plugins/router_xmldir/router_xmldir.c @@ -29,7 +29,10 @@ static int uwsgi_routing_func_xmldir(struct wsgi_request *wsgi_req, struct uwsgi xmlDocSetRootElement(rdoc, rtree); for(i=0;id_name[0] == '.') goto next; + if ((strcmp(tasklist[i]->d_name, ".") == 0) || + (strcmp(tasklist[i]->d_name, "..") == 0)) { + goto next; + } switch (tasklist[i]->d_type) { case DT_DIR: xmlNewTextChild(rtree, NULL, BAD_CAST "directory", BAD_CAST tasklist[i]->d_name);