diff options
author | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-12-15 10:50:24 +0000 |
---|---|---|
committer | Ito Hiroyuki <ZXB01226@nifty.com> | 2010-12-15 10:50:24 +0000 |
commit | 7c039a46d5faf90e26408e073cedca510efc1eac (patch) | |
tree | daa41a2e68a32a9d71505455546f425272abfd70 /url.c | |
parent | [w3m-dev 04419] AC_W3M_EXTLIBS does not check /lib64 (diff) | |
download | w3m-7c039a46d5faf90e26408e073cedca510efc1eac.tar.gz w3m-7c039a46d5faf90e26408e073cedca510efc1eac.zip |
[w3m-dev 04424] http://www.j10n.org/files/w3m-cvs-1.1040-misc.patch
Diffstat (limited to '')
-rw-r--r-- | url.c | 28 |
1 files changed, 17 insertions, 11 deletions
@@ -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 * |