After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 383047 - Viewing mail attachments
Viewing mail attachments
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.10.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[attachments]
Depends on:
Blocks:
 
 
Reported: 2006-12-06 16:31 UTC by Matthew Barnes
Modified: 2009-04-27 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (1.55 KB, patch)
2006-12-06 17:20 UTC, Matthew Barnes
needs-work Details | Review

Description Matthew Barnes 2006-12-06 16:31:36 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
Comment 1 Matthew Barnes 2006-12-06 17:20:42 UTC
Created attachment 77834 [details] [review]
Proposed patch

My patch is based on mclasen's with a bit of extra code cleanup.
Comment 2 Matthew Barnes 2006-12-15 17:15:17 UTC
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.
Comment 3 Dave Torrey 2007-02-05 03:29:22 UTC
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
Comment 4 Mark Stosberg 2007-03-26 03:01:12 UTC
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
Comment 5 pfudd 2007-05-14 07:13:09 UTC
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. :-)
Comment 6 pfudd 2007-05-14 07:35:08 UTC
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'.

Comment 7 Matthew Barnes 2008-03-11 00:32:06 UTC
Bumping version to a stable release.
Comment 8 Matthew Barnes 2009-03-27 22:04:28 UTC
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.
Comment 9 Matthew Barnes 2009-04-27 19:20:43 UTC
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