mutt stable branch with some hacks
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Chain %d->%F->%f in the attachment menu.

Previously, %d would use %f if there was no description set.

Place the new %F option in between %d and %f. This way, %d will fall
back on %F, which will fall back on %f. This allows the standard
attachment menu to show d_filename.

This is useful for forwarding attachments or editing draft files with
attachments. In these cases the actual filename is sanitized but the
attachment name is preserved in d_filename.

+16 -20
+16 -20
recvattach.c
··· 236 236 break; 237 237 } 238 238 } 239 - if (!aptr->content->filename) 239 + if (!aptr->content->d_filename && !aptr->content->filename) 240 240 { 241 241 mutt_format_s (dest, destlen, prefix, "<no description>"); 242 242 break; ··· 246 246 (mutt_is_message_type (aptr->content->type, aptr->content->subtype) 247 247 && MsgFmt && aptr->content->hdr)) 248 248 break; 249 + /* FALLS THROUGH TO 'F' */ 250 + case 'F': 251 + if (!optional) 252 + { 253 + if (aptr->content->d_filename) 254 + { 255 + mutt_format_s (dest, destlen, prefix, aptr->content->d_filename); 256 + break; 257 + } 258 + } 259 + else if (!aptr->content->d_filename && !aptr->content->filename) 260 + { 261 + optional = 0; 262 + break; 263 + } 249 264 /* FALLS THROUGH TO 'f' */ 250 265 case 'f': 251 266 if(!optional) ··· 262 277 mutt_format_s (dest, destlen, prefix, NONULL (aptr->content->filename)); 263 278 } 264 279 else if(!aptr->content->filename) 265 - optional = 0; 266 - break; 267 - case 'F': 268 - if (!optional) 269 - { 270 - char fname[_POSIX_PATH_MAX]; 271 - char *src = NULL; 272 - 273 - if (aptr->content->d_filename) 274 - src = aptr->content->d_filename; 275 - else if (aptr->content->filename) 276 - src = aptr->content->filename; 277 - else 278 - break; 279 - 280 - strfcpy (fname, mutt_basename (NONULL (src)), sizeof (fname)); 281 - mutt_format_s (dest, destlen, prefix, fname); 282 - } 283 - else if (!aptr->content->d_filename && !aptr->content->filename) 284 280 optional = 0; 285 281 break; 286 282 case 'D':