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 341482 - the attachment (.doc/.xls) doesnt open directly from mail client
the attachment (.doc/.xls) doesnt open directly from mail client
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
2.6.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
: 354679 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-05-11 23:13 UTC by Sebastien Bacher
Modified: 2006-09-06 22:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Proposed patch (669 bytes, patch)
2006-05-22 11:15 UTC, Srinivasa Ragavan
none Details | Review
Attaching the right fix (802 bytes, patch)
2006-05-22 11:17 UTC, Srinivasa Ragavan
accepted-commit_now Details | Review
Updated patch (2.10 KB, patch)
2006-08-10 06:03 UTC, Srinivasa Ragavan
committed Details | Review

Description Sebastien Bacher 2006-05-11 23:13:29 UTC
That bug has been opened on https://launchpad.net/distros/ubuntu/+source/evolution/+bug/44150

"Hi,

I have following packages installed in ubuntu 6.06 (Dapper beta)
Evolution-2.6.1
OpenOffice - 2.0.2

If I receive an email with .doc/.xls attachment and I double click to open that , the openoffice starts and give the error

/home/<username>/.evolution/cache/tmp/evolution-tmp-n6AIpH/data.xls doesnt exist

though I checked it is there.

Is it a bug in evolution or openoffice

Regards
Tapesh
(tapeshag@hotmail.com)
..."
Comment 1 Sebastien Bacher 2006-05-11 23:15:38 UTC
it does the same on my box when doing that:
- create a new mail
- attach a .xls to it
- double click on the icon from the attachment bar it does the same
- right click on it, open with works fine

It tries to run "app file:PATH", which some apps don't like...
Comment 2 Sebastien Bacher 2006-05-11 23:35:55 UTC
The issue is to widgets/misc/e-attachment-bar.c eab_icon_clicked_cb()

"			attachment = (EAttachment *)p->data;

			/* Check if the file is stored already */
			if (!attachment->store_uri) {
				CamelURL *curl;
				
				path = temp_save_part (attachment->body);				
				curl  = camel_url_new ("file:", NULL);
				camel_url_set_path ( curl, path);
				attachment->store_uri = camel_url_to_string (curl, 0);
				camel_url_free (curl);
			}

			/* launch the url now */
			gnome_url_show (attachment->store_uri, &error);"
Comment 3 Poornima 2006-05-12 08:51:03 UTC
Reproducible in evolution 2.6.1
Comment 4 Sankar P 2006-05-22 08:47:19 UTC
A fix has been made by Srag for this. 
Comment 5 Sebastien Bacher 2006-05-22 10:39:48 UTC
could people attach their fixes to bugzilla instead of keeping them to some random place or hidden?
Comment 6 Srinivasa Ragavan 2006-05-22 11:15:22 UTC
Created attachment 65992 [details] [review]
Proposed patch

This should fix the issue.
Comment 7 Srinivasa Ragavan 2006-05-22 11:16:16 UTC
Added the wrong stuff.
Comment 8 Srinivasa Ragavan 2006-05-22 11:17:10 UTC
Created attachment 65993 [details] [review]
Attaching the right fix
Comment 9 Sebastien Bacher 2006-05-25 12:25:22 UTC
did you try that patch? I tried a similar hack when I sent the bug and it makes no difference with the GNOME 2.14.1 code. I just tried your patch and it doesn't seem to fix the issue
Comment 10 Srinivasa Ragavan 2006-05-25 16:28:06 UTC
seb, I have that working now. It fixes the problem for me. Even try 

'gnome-open file:/home/test/foo.xls' would give a similiar error.

'gnome-open file:///home/test/foo.xls' should work. I have done the same fix. It works for me for sure :)
Comment 11 Sebastien Bacher 2006-05-25 17:42:25 UTC
weird, the path is still file:PATH with your change, it looks like that your change doesn't make a difference. Maybe the API behaviour changed with the CVS since GNOME 2.14?
Comment 12 Srinivasa Ragavan 2006-05-26 04:14:58 UTC
seb, if possible do a print of what cmd it execs, it works for me. May be Ill ask someone else to try this too
Comment 13 Sven Vranckx 2006-06-07 10:12:46 UTC
In my case (Ubuntu Dapper Drake 6.06) OpenOffice pops up a message box with the following error:

/home/sven/file:/home/sven/.evolution/cache/tmp/evolution-tmp-PvXEmM/Meeting.xls doesn't exist

I guess that OpenOffice fails because my home directory "/home/sven/" shows up twice in this path.

Comment 14 André Klapper 2006-07-15 10:43:18 UTC
hmm, any news on this? srag, seb? :-/
Comment 15 Srinivasa Ragavan 2006-08-03 10:25:31 UTC
With this patch It just works for me. Any other volunteers to test this patch?
Comment 16 Sebastien Bacher 2006-08-03 14:06:27 UTC
The patch doesn't apply to current code and doing a similar change makes no difference to GNOME 2.15.90, it still tries to open "file:/path". With what version are you trying? Are you sure that's not your openoffice simply accepting to open "file:/path"?
Comment 17 Srinivasa Ragavan 2006-08-03 17:54:19 UTC
Seb, with out this I face the issue and with this I dont see it. 
Comment 18 Sankar P 2006-08-04 08:22:53 UTC
I tested the patch and it works perfectly. I am not sure if the version of OpenOffice one has got something to do with this. I tested against the stable build of Evolution (2.6.3) and OpenOffice  2.0.2 and the patch works fine.

Approved for both stable branch and HEAD.
Comment 19 Sebastien Bacher 2006-08-09 17:44:43 UTC
The code is like that:

"...
			/* Check if the file is stored already */
			if (!attachment->store_uri) {
				path = temp_save_part (attachment->body);				
				url = camel_url_new ("file:", NULL);
				camel_url_set_path (url, path);
				attachment->store_uri = camel_url_to_string (url, 0);
				camel_url_free (url);
				g_free (path);
			}

			/* launch the url now */
			gnome_url_show (attachment->store_uri, &error);
..."

some printfs to the code indicates that when double clicking on the attachment from the composer window the "if (!attachment->store_uri)" is false (attachment->store_uri already set), so your patch makes no change to the behaviour, it might be right but fix only the case where store_uri was not set
Comment 20 Srinivasa Ragavan 2006-08-10 06:03:11 UTC
Created attachment 70615 [details] [review]
Updated patch

Seb, You rock. I have put an updated fix. This should solve all the problem. Thanks for your extended support :)
Comment 21 Srinivasa Ragavan 2006-08-10 06:04:36 UTC
I was trying a scenario, where the attachment wasnt downloaded earlier. Not, with this, when ever the attachment is downloaded, it has the right store.
Comment 22 Sebastien Bacher 2006-08-10 07:53:44 UTC
the new patch works fine!
Comment 23 Srinivasa Ragavan 2006-08-10 08:03:55 UTC
Fixed to stable and HEAD.
Comment 24 Sergej Kotliar 2006-09-06 22:29:30 UTC
*** Bug 354679 has been marked as a duplicate of this bug. ***