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

[images] Save in cache only if ui.sessions.postpone_unlink is set. Refs #257

This commit is contained in:
Witold Filipczyk 2023-08-11 13:29:55 +02:00
parent acbc574b4b
commit cce12632c2

View File

@ -553,11 +553,13 @@ download_data_store(struct download *download, struct file_download *file_downlo
/* Temporary file is deleted by the dgi_protocol_handler */
file_download->delete_ = 0;
} else {
char *url = get_uri_string(file_download->uri, URI_PUBLIC);
if (get_opt_bool("ui.sessions.postpone_unlink", NULL)) {
char *url = get_uri_string(file_download->uri, URI_PUBLIC);
if (url) {
uri_tempfiles[url] = file_download->file;
mem_free(url);
if (url) {
uri_tempfiles[url] = file_download->file;
mem_free(url);
}
}
exec_on_terminal(term, file_download->external_handler,
file_download->file,