mirror of
https://github.com/rkd77/elinks.git
synced 2024-09-06 23:44:43 -04:00
Never show empty filename in the what-to-do dialog
This fixes the last comment of bug 396.
This commit is contained in:
parent
6390c327aa
commit
58c83a9f48
@ -1143,8 +1143,15 @@ do_type_query(struct type_query *type_query, unsigned char *ct, struct mime_hand
|
||||
}
|
||||
|
||||
text = get_dialog_offset(dlg, TYPE_QUERY_WIDGETS_COUNT);
|
||||
/* For "default directory index pages" with wrong content-type
|
||||
* the filename can be NULL, e.g. http://www.spamhaus.org in bug 396. */
|
||||
if (filename.length) {
|
||||
format = _("What would you like to do with the file '%s' (type: %s%s%s)?", term);
|
||||
snprintf(text, MAX_STR_LEN, format, filename.source, ct, desc_sep, description);
|
||||
} else {
|
||||
format = _("What would you like to do with the file (type: %s%s%s)?", term);
|
||||
snprintf(text, MAX_STR_LEN, format, ct, desc_sep, description);
|
||||
}
|
||||
|
||||
done_string(&filename);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user