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:
parent
21f9b59130
commit
d0be89a16c
@ -985,6 +985,25 @@ tp_open(struct type_query *type_query)
|
|||||||
return;
|
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, "");
|
continue_download(type_query, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user