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

Never show empty filename in the what-to-do dialog

This fixes the last comment of bug 396.

[ From commit 58c83a9f48 in ELinks
  0.12.GIT.  --KON ]
This commit is contained in:
Jonas Fonseca 2006-11-06 04:55:26 +01:00 committed by Kalle Olavi Niemitalo
parent 6f9f09781d
commit ed29b38a9a

View File

@ -1034,8 +1034,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);