[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mailcap question: should %s be quoted?



On Mon, Apr 18, 2005 at 12:17:29PM -0700, Bill Moseley wrote:
> On Fri, Apr 08, 2005 at 09:53:33PM +0200, Almut Behrens wrote:
> > FWIW, with my version of mutt (1.4.2.1i; with config setting
> > mailcap_sanitize=yes), when viewing MIME attachments, I've so far never
> > encountered this problem, as mutt seems to create a tempfile, with
> > spaces and all other unsafe chars replaced by underscores, thereby
> > simply circumventing this problem in the first place.  I've just
> > verified it passes something like /home/almut/.mutt/tmp/test_doc.pdf
> > for %s, even though the original name (as shown in the attachment
> > listing) was "test doc.pdf".
> 
> I think the exception is when *sending* mail and you have an
> attachment.  Try attaching a file with spaces and before sending you
> hit <Enter> to display the file.  In that case mutt doesn't need to
> use a temp file so it sends the file with spaces.  IIRC, I think
> that's what first prompted my question.
> 
> > But apparently, you're invoking mutt's mailcap functionality from
> > some other context...(?)  and it's me not getting it... :)
> 
> Yes, as above.

I still don't seem to be able to reproduce the problem.

I attached the file "test doc.pdf", and before sending I displayed the
attachment.  As above, I still get /home/almut/.mutt/tmp/test_doc.pdf
being passed as %s.  Doing an strace shows that mutt - in this case -
is creating a (sanitized) symlink to the original file:

...
unlink("/home/almut/.mutt/tmp/test_doc.pdf") = -1 ENOENT (No such file or directory)
symlink("/home/almut/test doc.pdf", "/home/almut/.mutt/tmp/test_doc.pdf") = 0
...


Almut



Reply to: