Ticket #3179 (closed defect: fixed)

Opened 13 months ago

Last modified 12 months ago

Attach: pseudoheader doesn't work with files with spaces

Reported by: edgewood Owned by: mutt-dev
Priority: minor Milestone:
Component: mutt Version: 1.5.17
Keywords: Cc:

Description

I'm running into problems with using the Attach: pseudoheader with files with spaces in their names.

If I try attach a file named 'space test.txt' using "Attach: space test.txt", mutt replies "space: unable to attach file".

If I use "Attach: space\ test.txt", mutt replies "space\: unable to attach file". I've also tried "Attach: 'space test.txt'" and the same with double quotes, with similar error messages.

Mutt's manual indicates that the Attach: pseudoheader allows a file name optionally followed by a space and a description, and the error message leads me to believe that mutt assumes that any space after the start of the filename is the description delimiter.

Attachments

fix_attach_patch.diff Download (1.1 KB) - added by chrisbra 12 months ago.

Change History

Changed 12 months ago by chrisbra

I have created an experimental patch for that issue. My C-skills are rusty, but it seems to work for me. This patch is against 1.5.18.

Changed 12 months ago by chrisbra

Changed 12 months ago by edgewood

There seems to be a missing semicolon between the lines "*q='\0'" and "q-=leng;" (listed as lines 184 and 185 at < http://dev.mutt.org/trac/attachment/ticket/3179/fix_attach_patch.diff>)

Adding the semicolon manually at the end of line 184 allows the patch to compile, and once compiled, the patch works as expected.

Changed 12 months ago by Rocco Rutte <pdmef@…>

  • status changed from new to closed
  • resolution set to fixed

(In [ee5e696a9d08]) Support spaces in Attach: pseudoheader. Closes #3179.

Note: See TracTickets for help on using tickets.