1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

When requested to open local files with a handler use the file in place

Everything else is really stupid, i.e. to go through the callback-infested
download code. A parly fix of bug 238 (caching of local files).
This commit is contained in:
Jonas Fonseca 2006-01-07 20:19:37 +01:00 committed by Jonas Fonseca
parent 21f9b59130
commit d0be89a16c

View File

@ -985,6 +985,25 @@ tp_open(struct type_query *type_query)
return;
}
if (type_query->uri->protocol == PROTOCOL_FILE) {
unsigned char *file = get_uri_string(type_query->uri, URI_PATH);
unsigned char *handler = NULL;
if (file) {
handler = subst_file(type_query->external_handler, file);
mem_free(file);
}
if (handler) {
exec_on_terminal(type_query->ses->tab->term,
handler, "", !!type_query->block);
mem_free(handler);
}
done_type_query(type_query);
return;
}
continue_download(type_query, "");
}