aboutsummaryrefslogtreecommitdiffstats
path: root/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'url.c')
-rw-r--r--url.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/url.c b/url.c
index ac82082..ed6062e 100644
--- a/url.c
+++ b/url.c
@@ -1,4 +1,4 @@
-/* $Id: url.c,v 1.99 2010/12/11 13:00:11 htrb Exp $ */
+/* $Id: url.c,v 1.100 2010/12/15 10:50:24 htrb Exp $ */
#include "fm.h"
#ifndef __MINGW32_VERSION
#include <sys/types.h>
@@ -1814,20 +1814,26 @@ static void
add_index_file(ParsedURL *pu, URLFile *uf)
{
char *p, *q;
+ TextList *index_file_list = NULL;
+ TextListItem *ti;
- if (index_file == NULL || index_file[0] == '\0') {
+ if (non_null(index_file))
+ index_file_list = make_domain_list(index_file);
+ if (index_file_list == NULL) {
uf->stream = NULL;
return;
}
- p = Strnew_m_charp(pu->file, "/", file_quote(index_file), NULL)->ptr;
- p = cleanupName(p);
- q = cleanupName(file_unquote(p));
- examineFile(q, uf);
- if (uf->stream == NULL)
- return;
- pu->file = p;
- pu->real_file = q;
- return;
+ for (ti = index_file_list->first; ti; ti = ti->next) {
+ p = Strnew_m_charp(pu->file, "/", file_quote(ti->ptr), NULL)->ptr;
+ p = cleanupName(p);
+ q = cleanupName(file_unquote(p));
+ examineFile(q, uf);
+ if (uf->stream != NULL) {
+ pu->file = p;
+ pu->real_file = q;
+ return;
+ }
+ }
}
static char *