GNOME Bugzilla – Bug 383047
Viewing mail attachments
Last modified: 2009-04-27 19:20:43 UTC
Forwarding from a downstream bug report: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216537 The downstream reporter received a PDF attachment named "Invoice # 53612.PDF" and was unable to open the attachment by selecting "Open in Document Viewer..." from Evolution. Attachment: http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=141708 Screenshot: http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=141818 Matthias Clasen figured out the problem: "I believe the problem is that for viewing attachments, evo calls em_utils_temp_save_part(), which constructs a temp path and passes it on to mail_save_part(), which defers the acutal saving to a thread that calls save_part_save(), which treats the path as an uri and passes it into camel_stream_vfs_new_with_uri()." [1] [1] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216537#c7
Created attachment 77834 [details] [review] Proposed patch My patch is based on mclasen's with a bit of extra code cleanup.
This patch needs more work. It was found to cause side-effects when saving attachments. See http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=219228 Looks like it exposes a secondary issue in Camel.
More information, in case it helps: In 2.8.2.1, under FC6, when I receive an attachment with a pound sign (#), the helper app (evince, for example) fails to load it. Evince throws a "file not found" error dialog up. I replaced evince with a short script, and found that it was given the URI for the saved attachment as: file:///home/tj/.evolution/cache/tmp/evolution-tmp-yKSzJ7/Vendor_Quotation%231234567_01.pdf Looking in that directory, I found the file, but the name was just "Vendor_Quotation". The %23 and everything afterwards was stripped. Older versions of Evolution (at least the one under FC5) worked as expected. Saving the file and opening it manually does work, albeit less conveniently. Hope that helps. Let me know if you need any more information. Thanks, Dave
I think this bug should be moved out of the UNCONFIRMED state. There is a screenshot of the bug happening, and attempted patches have already been posted to try to address it. It sounds like a real bug to me. Mark
Yep, it's happening to me too; FC6, Evolution 2.8.3. The attachment filename (a pdf file) has a hash mark (#), and evolution behaves as if the last half of the filename is a comment, and cuts it off. Then it calls the pdf viewer with the uncut filename. In ~/.xsession: Error: Couldn't open file '/home/pooky/.evolution/cache/tmp/evolution-tmp-ClCURO /Invoice_#21_-_maint_renewal.pdf' In ~/.evolution/cache/tmp/evolution-tmp-ClCURO/ there is a file named Invoice_ which is the pdf file. What do you call '#', a hash, a pound sign, a sharp, an octothorpe, a crosshatch, a square, a widget, or a number sign? (This is just a clever way of getting these search terms into bugzilla so others can find this bug, please ignore. :-)
Hmm... I just found that it's also cutting the hash mark when you click on 'save all' attachments. I have an email with three attachments: file#1.pdf file#2.pdf file#3.pdf When I use 'save all' and select the /tmp directory, only one file appears in /tmp, called 'file'.
Bumping version to a stable release.
This is working correctly now in my attachment rewrite on the kill-bonobo branch, where I'm using GIO to do the saving. It handles the hash character properly.
The attachment rewrite has been committed to the master branch and is believed to have addressed this bug. If you find that not to be the case, please reopen. http://git.gnome.org/cgit/evolution/commit/?id=e377ea5e61171e57f9e892652d0fd1f77953eda8